• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SamboyCoding / Cpp2IL / 15012587440

14 May 2025 04:55AM UTC coverage: 34.729% (-0.1%) from 34.826%
15012587440

Pull #452

github

web-flow
Merge 21c866c60 into e93c0fecc
Pull Request #452: Expand type system to support more types

1813 of 6508 branches covered (27.86%)

Branch coverage included in aggregate %.

22 of 83 new or added lines in 10 files covered. (26.51%)

4 existing lines in 3 files now uncovered.

4158 of 10685 relevant lines covered (38.91%)

160672.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/Cpp2IL.Core/Model/Contexts/WrappedTypeAnalysisContext.cs
1
using LibCpp2IL.BinaryStructures;
2

3
namespace Cpp2IL.Core.Model.Contexts;
4

5
/// <summary>
6
/// Represents any type which is just a wrapper with additional info around an element type.
7
/// For example, pointers, byref types, arrays.
8
/// </summary>
9
public abstract class WrappedTypeAnalysisContext(
10
    TypeAnalysisContext elementType,
11
    AssemblyAnalysisContext referencedFrom) : ReferencedTypeAnalysisContext(referencedFrom)
104,961✔
12
{
13
    public virtual TypeAnalysisContext ElementType { get; } = elementType;
182,724✔
14

15
    public override string DefaultNs => ElementType.Namespace;
×
16

17
    public static WrappedTypeAnalysisContext Create(Il2CppType rawType, AssemblyAnalysisContext referencedFrom)
18
    {
19
        return rawType.Type switch
53,273!
20
        {
53,273✔
21
            Il2CppTypeEnum.IL2CPP_TYPE_PTR => new PointerTypeAnalysisContext(rawType, referencedFrom),
2,994✔
22
            Il2CppTypeEnum.IL2CPP_TYPE_BYREF => new ByRefTypeAnalysisContext(rawType, referencedFrom),
×
23
            Il2CppTypeEnum.IL2CPP_TYPE_ARRAY => new ArrayTypeAnalysisContext(rawType, referencedFrom),
5✔
24
            Il2CppTypeEnum.IL2CPP_TYPE_SZARRAY => new SzArrayTypeAnalysisContext(rawType, referencedFrom),
50,274✔
NEW
25
            Il2CppTypeEnum.IL2CPP_TYPE_BOXED => new BoxedTypeAnalysisContext(rawType, referencedFrom),
×
NEW
26
            Il2CppTypeEnum.IL2CPP_TYPE_PINNED => new PinnedTypeAnalysisContext(rawType, referencedFrom),
×
UNCOV
27
            _ => throw new($"Type {rawType.Type} is not a wrapper type")
×
28
        };
53,273✔
29
    }
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc