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

SamboyCoding / Cpp2IL / 15172415984

21 May 2025 08:56PM UTC coverage: 34.294% (+0.2%) from 34.062%
15172415984

Pull #462

github

web-flow
Merge 483c13920 into 5807d2b6c
Pull Request #462: Support overriding member types

1801 of 6644 branches covered (27.11%)

Branch coverage included in aggregate %.

128 of 232 new or added lines in 35 files covered. (55.17%)

5 existing lines in 5 files now uncovered.

4199 of 10852 relevant lines covered (38.69%)

186271.78 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)
94,393✔
12
{
13
    public virtual TypeAnalysisContext ElementType { get; } = elementType;
189,836✔
14

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

17
    public static WrappedTypeAnalysisContext Create(Il2CppType rawType, AssemblyAnalysisContext referencedFrom)
18
    {
19
        return rawType.Type switch
40,219!
20
        {
40,219✔
21
            Il2CppTypeEnum.IL2CPP_TYPE_PTR => new PointerTypeAnalysisContext(rawType, referencedFrom),
2,735✔
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),
37,479✔
25
            Il2CppTypeEnum.IL2CPP_TYPE_BOXED => new BoxedTypeAnalysisContext(rawType, referencedFrom),
×
26
            Il2CppTypeEnum.IL2CPP_TYPE_PINNED => new PinnedTypeAnalysisContext(rawType, referencedFrom),
×
27
            _ => throw new($"Type {rawType.Type} is not a wrapper type")
×
28
        };
40,219✔
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