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

xoofx / CppAst.NET / 14764148296

30 Apr 2025 08:52PM UTC coverage: 78.596% (-0.2%) from 78.842%
14764148296

push

github

web-flow
Merge pull request #110 from xoofx/objective-c

Add support for Objective-C

1123 of 1824 branches covered (61.57%)

Branch coverage included in aggregate %.

456 of 566 new or added lines in 13 files covered. (80.57%)

2 existing lines in 1 file now uncovered.

4888 of 5824 relevant lines covered (83.93%)

2189.8 hits per line

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

0.0
/src/CppAst/CppGenericType.cs
1
// Copyright (c) Alexandre Mutel. All rights reserved.
2
// Licensed under the BSD-Clause 2 license.
3
// See license.txt file in the project root for full license information.
4

5
using System.Collections.Generic;
6
using System.Text;
7

8
namespace CppAst;
9

10
/// <summary>
11
/// A generic type, a type that has a base type and a list of generic type arguments.
12
/// </summary>
13
public class CppGenericType : CppType
14
{
NEW
15
    public CppGenericType(CppType baseType) : base(CppTypeKind.GenericType)
×
16
    {
NEW
17
        BaseType = baseType;
×
18
        GenericArguments = new List<CppType>();
NEW
19
    }
×
20
    
21
    public CppType BaseType { get; set; }
22
    
23
    public List<CppType> GenericArguments { get; }
24
    
25
    public override int SizeOf { get; set; }
26
    
NEW
27
    public override CppType GetCanonicalType() => this;
×
28

29

30
    public override string ToString()
31
    {
NEW
32
        var builder = new StringBuilder();
×
NEW
33
        builder.Append(BaseType.GetDisplayName());
×
NEW
34
        if (GenericArguments.Count > 0)
×
35
        {
NEW
36
            builder.Append('<');
×
NEW
37
            for (int i = 0; i < GenericArguments.Count; i++)
×
38
            {
NEW
39
                if (i > 0)
×
40
                {
NEW
41
                    builder.Append(", ");
×
42
                }
NEW
43
                builder.Append(GenericArguments[i].GetDisplayName());
×
44
            }
NEW
45
            builder.Append(">");
×
46
        }
NEW
47
        return builder.ToString();
×
48
    }
49
}
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