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

SamboyCoding / Cpp2IL / 13015566663

28 Jan 2025 04:59PM UTC coverage: 27.503% (+0.007%) from 27.496%
13015566663

push

github

SamboyCoding
Core: Fix issues with CA gen analysis on v27, crash if no game path or force options specified.

1254 of 6380 branches covered (19.66%)

Branch coverage included in aggregate %.

6 of 18 new or added lines in 6 files covered. (33.33%)

3366 of 10418 relevant lines covered (32.31%)

124924.5 hits per line

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

80.0
/Cpp2IL.Core/Model/Contexts/InjectedTypeAnalysisContext.cs
1
using System.Linq;
2
using System.Reflection;
3

4
namespace Cpp2IL.Core.Model.Contexts;
5

6
public class InjectedTypeAnalysisContext : TypeAnalysisContext
7
{
8
    public override string DefaultName { get; }
4✔
9

10
    public override string DefaultNs { get; }
8✔
11

12
    public override TypeAttributes TypeAttributes { get; }
×
13
    
NEW
14
    protected override bool IsInjected => true;
×
15

16
    public InjectedTypeAnalysisContext(AssemblyAnalysisContext containingAssembly, string name, string ns, TypeAnalysisContext? baseType, TypeAttributes typeAttributes = DefaultTypeAttributes) : base(null, containingAssembly)
210✔
17
    {
18
        DefaultName = name;
210✔
19
        DefaultNs = ns;
210✔
20
        OverrideBaseType = baseType;
210✔
21
        TypeAttributes = typeAttributes;
210✔
22
    }
210✔
23

24
    public InjectedMethodAnalysisContext InjectMethodContext(string methodName, bool isStatic, TypeAnalysisContext returnType, MethodAttributes attributes, params TypeAnalysisContext[] args)
25
    {
26
        if (args.Any(a => a.Definition == null))
210!
27
            throw new("Cannot inject a method using injected types as parameters, yet.");
×
28

29
        var method = new InjectedMethodAnalysisContext(this, methodName, isStatic, returnType, attributes, args);
126✔
30
        Methods.Add(method);
126✔
31

32
        return method;
126✔
33
    }
34

35
    public InjectedFieldAnalysisContext InjectFieldContext(string fieldName, TypeAnalysisContext fieldType, FieldAttributes attributes)
36
    {
37
        var field = new InjectedFieldAnalysisContext(fieldName, fieldType, attributes, this);
42✔
38
        Fields.Add(field);
42✔
39
        return field;
42✔
40
    }
41
}
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

© 2026 Coveralls, Inc