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

SamboyCoding / Cpp2IL / 15144219583

20 May 2025 05:38PM UTC coverage: 34.28% (+0.2%) from 34.047%
15144219583

Pull #462

github

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

1799 of 6646 branches covered (27.07%)

Branch coverage included in aggregate %.

115 of 202 new or added lines in 33 files covered. (56.93%)

22 existing lines in 6 files now uncovered.

4197 of 10845 relevant lines covered (38.7%)

186399.11 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