Skip to content

Commit 4e735b5

Browse files
committed
Test for consistent struct/class keywords.
Tests for cases where class name matches translation unit name. Tests for cases where global constants/functions from different translation units would end up in the value type.
1 parent 0b99682 commit 4e735b5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/CSharp/CSharp.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public override void Preprocess(Driver driver, ASTContext ctx)
3636
ctx.SetClassAsValueType("QPoint");
3737
ctx.SetClassAsValueType("QSize");
3838
ctx.SetClassAsValueType("QRect");
39+
ctx.SetClassAsValueType("CSharp");
3940
ctx.SetClassAsValueType("StructTestArrayTypeFromTypedef");
4041
ctx.IgnoreClassWithName("IgnoredTypeInheritingNonIgnoredWithNoEmptyCtor");
4142
ctx.IgnoreClassWithName("Ignored");

tests/CSharp/CSharp.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,3 +1266,9 @@ class DLL_API HasFixedArrayOfPointers
12661266
~HasFixedArrayOfPointers();
12671267
Foo* fixedArrayOfPointers[3];
12681268
};
1269+
1270+
struct DLL_API CSharp
1271+
{
1272+
};
1273+
1274+
static int FOOBAR_CONSTANT = 42;

0 commit comments

Comments
 (0)