diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/AnonymousEnumReferenceExcludeUsingStaticsTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/AnonymousEnumReferenceExcludeUsingStaticsTest.cs
index 31c8fc23..c3dc93ab 100644
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/AnonymousEnumReferenceExcludeUsingStaticsTest.cs
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/AnonymousEnumReferenceExcludeUsingStaticsTest.cs
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
using System.Threading.Tasks;
+using ClangSharp.UnitTests.Baseline;
using NUnit.Framework;
namespace ClangSharp.UnitTests;
@@ -12,8 +13,10 @@ namespace ClangSharp.UnitTests;
/// rather than the non-existent __AnonymousEnum_* enum name.
///
[Platform("win")]
-public sealed class AnonymousEnumReferenceExcludeUsingStaticsTest : PInvokeGeneratorTest
+public sealed class AnonymousEnumReferenceExcludeUsingStaticsTest : StandaloneBaselineTest
{
+ protected override string Area => "AnonymousEnumReferenceExcludeUsingStatics";
+
[Test]
public Task ReferenceIsQualifiedWithBackingClass()
{
@@ -26,23 +29,9 @@ enum MyEnum2 : int
{
MyEnum2_Value1 = MyEnum1_Value1,
};
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public enum MyEnum2
- {
- MyEnum2_Value1 = Methods.MyEnum1_Value1,
- }
-
- public static partial class Methods
- {
- public const int MyEnum1_Value1 = 1;
- }
-}
";
var diagnostics = new[] { new Diagnostic(DiagnosticLevel.Info, "Found anonymous enum: __AnonymousEnum_ClangUnsavedFile_L1_C1. Mapping values as constants in: Methods", "Line 1, Column 1 in ClangUnsavedFile.h") };
- return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.DontUseUsingStaticsForEnums, expectedDiagnostics: diagnostics);
+ return ValidateGeneratedCSharpLatestWindowsBaselineAsync(inputContents, PInvokeGeneratorConfigurationOptions.DontUseUsingStaticsForEnums, expectedDiagnostics: diagnostics);
}
}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationCSharpTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationCSharpTest.cs
deleted file mode 100644
index 13730c79..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationCSharpTest.cs
+++ /dev/null
@@ -1,614 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class CXXMethodDeclarationCSharpTest : CXXMethodDeclarationTest
-{
- protected override Task ConstructorTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int _value;
-
- MyStruct(int value)
- {
- _value = value;
- }
-};
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public int _value;
-
- public MyStruct(int value)
- {
- _value = value;
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task ConstructorWithInitializeTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int _x;
- int _y;
- int _z;
-
- MyStruct(int x) : _x(x)
- {
- }
-
- MyStruct(int x, int y) : _x(x), _y(y)
- {
- }
-
- MyStruct(int x, int y, int z) : _x(x), _y(y), _z()
- {
- }
-};
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public int _x;
-
- public int _y;
-
- public int _z;
-
- public MyStruct(int x)
- {
- _x = x;
- }
-
- public MyStruct(int x, int y)
- {
- _x = x;
- _y = y;
- }
-
- public MyStruct(int x, int y, int z)
- {
- _x = x;
- _y = y;
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task ConversionTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
- int* pointer;
- int** pointer2;
- int*** pointer3;
- operator int()
- {
- return value;
- }
- operator int*()
- {
- return pointer;
- }
- operator int**()
- {
- return pointer2;
- }
- operator int***()
- {
- return pointer3;
- }
-};
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public unsafe partial struct MyStruct
- {
- public int value;
-
- public int* pointer;
-
- public int** pointer2;
-
- public int*** pointer3;
-
- public int ToInt32()
- {
- return value;
- }
-
- public int* ToInt32Pointer()
- {
- return pointer;
- }
-
- public int** ToInt32PointerPointer()
- {
- return pointer2;
- }
-
- public int*** ToInt32PointerPointerPointer()
- {
- return pointer3;
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task DestructorTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- ~MyStruct()
- {
- }
-};
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public void Dispose()
- {
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task MacrosExpansionTestImpl()
- {
- var inputContents = @"typedef struct
-{
- unsigned char *buf;
- int size;
-} context_t;
-
-int buf_close(void *pContext)
-{
- ((context_t*)pContext)->buf=0;
- return 0;
-}
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public unsafe partial struct context_t
- {
- [NativeTypeName(""unsigned char *"")]
- public byte* buf;
-
- public int size;
- }
-
- public static unsafe partial class Methods
- {
- public static int buf_close(void* pContext)
- {
- ((context_t*)(pContext))->buf = null;
- return 0;
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task MemberCallTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- int MyFunction1()
- {
- return value;
- }
-
- int MyFunction2()
- {
- return MyFunction1();
- }
-
- int MyFunction3()
- {
- return this->MyFunction1();
- }
-};
-
-int MyFunctionA(MyStruct x)
-{
- return x.MyFunction1();
-}
-
-int MyFunctionB(MyStruct* x)
-{
- return x->MyFunction2();
-}
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public int value;
-
- public int MyFunction1()
- {
- return value;
- }
-
- public int MyFunction2()
- {
- return MyFunction1();
- }
-
- public int MyFunction3()
- {
- return this.MyFunction1();
- }
- }
-
- public static unsafe partial class Methods
- {
- public static int MyFunctionA(MyStruct x)
- {
- return x.MyFunction1();
- }
-
- public static int MyFunctionB(MyStruct* x)
- {
- return x->MyFunction2();
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task MemberTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- int MyFunction()
- {
- return value;
- }
-};
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public int value;
-
- public int MyFunction()
- {
- return value;
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task NewKeywordTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int Equals() { return 0; }
- int Equals(int obj) { return 0; }
- int Dispose() { return 0; }
- int Dispose(int obj) { return 0; }
- int GetHashCode() { return 0; }
- int GetHashCode(int obj) { return 0; }
- int GetType() { return 0; }
- int GetType(int obj) { return 0; }
- int MemberwiseClone() { return 0; }
- int MemberwiseClone(int obj) { return 0; }
- int ReferenceEquals() { return 0; }
- int ReferenceEquals(int obj) { return 0; }
- int ToString() { return 0; }
- int ToString(int obj) { return 0; }
-};";
-
- var expectedOutputContents = $@"namespace ClangSharp.Test
-{{
- public partial struct MyStruct
- {{
- public int Equals()
- {{
- return 0;
- }}
-
- public int Equals(int obj)
- {{
- return 0;
- }}
-
- public int Dispose()
- {{
- return 0;
- }}
-
- public int Dispose(int obj)
- {{
- return 0;
- }}
-
- public new int GetHashCode()
- {{
- return 0;
- }}
-
- public int GetHashCode(int obj)
- {{
- return 0;
- }}
-
- public new int GetType()
- {{
- return 0;
- }}
-
- public int GetType(int obj)
- {{
- return 0;
- }}
-
- public new int MemberwiseClone()
- {{
- return 0;
- }}
-
- public int MemberwiseClone(int obj)
- {{
- return 0;
- }}
-
- public int ReferenceEquals()
- {{
- return 0;
- }}
-
- public int ReferenceEquals(int obj)
- {{
- return 0;
- }}
-
- public new int ToString()
- {{
- return 0;
- }}
-
- public int ToString(int obj)
- {{
- return 0;
- }}
- }}
-}}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task OperatorTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- MyStruct(int value) : value(value)
- {
- }
-
- MyStruct operator+(MyStruct rhs)
- {
- return MyStruct(value + rhs.value);
- }
-};
-
-MyStruct operator-(MyStruct lhs, MyStruct rhs)
-{
- return MyStruct(lhs.value - rhs.value);
-}
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public int value;
-
- public MyStruct(int value)
- {
- this.value = value;
- }
-
- public MyStruct Add(MyStruct rhs)
- {
- return new MyStruct(value + rhs.value);
- }
- }
-
- public static partial class Methods
- {
- public static MyStruct Subtract(MyStruct lhs, MyStruct rhs)
- {
- return new MyStruct(lhs.value - rhs.value);
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task OperatorCallTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- MyStruct(int value) : value(value)
- {
- }
-
- MyStruct operator+(MyStruct rhs)
- {
- return MyStruct(value + rhs.value);
- }
-};
-
-MyStruct MyFunction1(MyStruct lhs, MyStruct rhs)
-{
- return lhs + rhs;
-}
-
-MyStruct operator-(MyStruct lhs, MyStruct rhs)
-{
- return MyStruct(lhs.value - rhs.value);
-}
-
-MyStruct MyFunction2(MyStruct lhs, MyStruct rhs)
-{
- return lhs - rhs;
-}
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public int value;
-
- public MyStruct(int value)
- {
- this.value = value;
- }
-
- public MyStruct Add(MyStruct rhs)
- {
- return new MyStruct(value + rhs.value);
- }
- }
-
- public static partial class Methods
- {
- public static MyStruct MyFunction1(MyStruct lhs, MyStruct rhs)
- {
- return lhs.Add(rhs);
- }
-
- public static MyStruct Subtract(MyStruct lhs, MyStruct rhs)
- {
- return new MyStruct(lhs.value - rhs.value);
- }
-
- public static MyStruct MyFunction2(MyStruct lhs, MyStruct rhs)
- {
- return Subtract(lhs, rhs);
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task ThisTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- int MyFunction()
- {
- return this->value;
- }
-};
-";
-
- var expectedOutputContents = @"namespace ClangSharp.Test
-{
- public partial struct MyStruct
- {
- public int value;
-
- public int MyFunction()
- {
- return this.value;
- }
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task UnsafeDoesNotImpactDllImportTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- void* MyVoidStarMethod()
- {
- return nullptr;
- }
-};
-
-extern ""C"" void MyFunction();";
-
- var expectedOutputContents = @"using System.Runtime.InteropServices;
-
-namespace ClangSharp.Test
-{
- public unsafe partial struct MyStruct
- {
- public void* MyVoidStarMethod()
- {
- return null;
- }
- }
-
- public static partial class Methods
- {
- [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
- public static extern void MyFunction();
- }
-}
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationTest.cs
deleted file mode 100644
index 6e81b3a5..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationTest.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class CXXMethodDeclarationTest : PInvokeGeneratorTest
-{
- [Test]
- public Task ConstructorTest() => ConstructorTestImpl();
-
- [Test]
- public Task ConstructorWithInitializeTest() => ConstructorWithInitializeTestImpl();
-
- [Test]
- public Task ConversionTest() => ConversionTestImpl();
-
- [Test]
- public Task DefaultParameterInheritedFromTemplateTest() => DefaultParameterInheritedFromTemplateTestImpl();
-
- [Test]
- public Task DestructorTest() => DestructorTestImpl();
-
- [Test]
- public Task InstanceTest() => InstanceTestImpl();
-
- [Test]
- public Task MacrosExpansionTest() => MacrosExpansionTestImpl();
-
- [Test]
- public Task MemberCallTest() => MemberCallTestImpl();
-
- [Test]
- public Task MemberTest() => MemberTestImpl();
-
- [Test]
- public Task NewKeywordTest() => NewKeywordTestImpl();
-
- [Test]
- public Task NewKeywordVirtualTest() => NewKeywordVirtualTestImpl();
-
- [Test]
- public Task NewKeywordVirtualWithExplicitVtblTest() => NewKeywordVirtualWithExplicitVtblTestImpl();
-
- [Test]
- public Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest() => NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl();
-
- [Test]
- public Task OperatorTest() => OperatorTestImpl();
-
- [Test]
- public Task OperatorCallTest() => OperatorCallTestImpl();
-
- [Test]
- public Task StaticTest() => StaticTestImpl();
-
- [Test]
- public Task ThisTest() => ThisTestImpl();
-
- [Test]
- public Task UnsafeDoesNotImpactDllImportTest() => UnsafeDoesNotImpactDllImportTestImpl();
-
- [Test]
- public Task VirtualTest() => VirtualTestImpl();
-
- [Test]
- public Task VirtualWithVtblIndexAttributeTest() => VirtualWithVtblIndexAttributeTestImpl();
-
- protected abstract Task ConstructorTestImpl();
-
- protected abstract Task ConstructorWithInitializeTestImpl();
-
- protected abstract Task ConversionTestImpl();
-
- protected abstract Task DefaultParameterInheritedFromTemplateTestImpl();
-
- protected abstract Task DestructorTestImpl();
-
- protected abstract Task InstanceTestImpl();
-
- protected abstract Task MacrosExpansionTestImpl();
-
- protected abstract Task MemberCallTestImpl();
-
- protected abstract Task MemberTestImpl();
-
- protected abstract Task NewKeywordTestImpl();
-
- protected abstract Task NewKeywordVirtualTestImpl();
-
- protected abstract Task NewKeywordVirtualWithExplicitVtblTestImpl();
-
- protected abstract Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl();
-
- protected abstract Task OperatorTestImpl();
-
- protected abstract Task OperatorCallTestImpl();
-
- protected abstract Task StaticTestImpl();
-
- protected abstract Task ThisTestImpl();
-
- protected abstract Task UnsafeDoesNotImpactDllImportTestImpl();
-
- protected abstract Task VirtualTestImpl();
-
- protected abstract Task VirtualWithVtblIndexAttributeTestImpl();
-
- protected abstract Task ValidateBindingsAsync(string inputContents, string expectedOutputContents);
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationXmlTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationXmlTest.cs
deleted file mode 100644
index 0a37bdf1..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationXmlTest.cs
+++ /dev/null
@@ -1,676 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class CXXMethodDeclarationXmlTest: CXXMethodDeclarationTest
-{
- protected override Task ConstructorTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int _value;
-
- MyStruct(int value)
- {
- _value = value;
- }
-};
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- void
-
- int
-
- _value = value;
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task ConstructorWithInitializeTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int _x;
- int _y;
- int _z;
-
- MyStruct(int x) : _x(x)
- {
- }
-
- MyStruct(int x, int y) : _x(x), _y(y)
- {
- }
-
- MyStruct(int x, int y, int z) : _x(x), _y(y), _z()
- {
- }
-};
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- int
-
-
- int
-
-
- void
-
- int
-
-
- x
-
-
-
-
- void
-
- int
-
-
- int
-
-
- x
-
-
- y
-
-
-
-
- void
-
- int
-
-
- int
-
-
- int
-
-
- x
-
-
- y
-
-
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task ConversionTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- operator int()
- {
- return value;
- }
-};
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- int
- return value;
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task DestructorTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- ~MyStruct()
- {
- }
-};
-";
-
- var expectedOutputContents = @"
-
-
-
-
- void
-
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task MacrosExpansionTestImpl()
- {
- var inputContents = @"typedef struct
-{
- unsigned char *buf;
- int size;
-} context_t;
-
-int buf_close(void *pcontext)
-{
- ((context_t*)pcontext)->buf=0;
- return 0;
-}
-";
-
- var expectedOutputContents = @"
-
-
-
-
- byte*
-
-
- int
-
-
-
-
- int
-
- void*
-
- ((context_t*)(pcontext))->buf = null;
- return 0;
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task MemberCallTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- int MyFunction1()
- {
- return value;
- }
-
- int MyFunction2()
- {
- return MyFunction1();
- }
-
- int MyFunction3()
- {
- return this->MyFunction1();
- }
-};
-
-int MyFunctionA(MyStruct x)
-{
- return x.MyFunction1();
-}
-
-int MyFunctionB(MyStruct* x)
-{
- return x->MyFunction2();
-}
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- int
- return value;
-
-
- int
- return MyFunction1();
-
-
- int
- return this.MyFunction1();
-
-
-
-
- int
-
- MyStruct
-
- return x.MyFunction1();
-
-
- int
-
- MyStruct*
-
- return x->MyFunction2();
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task MemberTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- int MyFunction()
- {
- return value;
- }
-};
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- int
- return value;
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task NewKeywordTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int Equals() { return 0; }
- int Equals(int obj) { return 0; }
- int Dispose() { return 0; }
- int Dispose(int obj) { return 0; }
- int GetHashCode() { return 0; }
- int GetHashCode(int obj) { return 0; }
- int GetType() { return 0; }
- int GetType(int obj) { return 0; }
- int MemberwiseClone() { return 0; }
- int MemberwiseClone(int obj) { return 0; }
- int ReferenceEquals() { return 0; }
- int ReferenceEquals(int obj) { return 0; }
- int ToString() { return 0; }
- int ToString(int obj) { return 0; }
-};";
-
- var expectedOutputContents = $@"
-
-
-
-
- int
- return 0;
-
-
- int
-
- int
-
- return 0;
-
-
- int
- return 0;
-
-
- int
-
- int
-
- return 0;
-
-
- int
- return 0;
-
-
- int
-
- int
-
- return 0;
-
-
- int
- return 0;
-
-
- int
-
- int
-
- return 0;
-
-
- int
- return 0;
-
-
- int
-
- int
-
- return 0;
-
-
- int
- return 0;
-
-
- int
-
- int
-
- return 0;
-
-
- int
- return 0;
-
-
- int
-
- int
-
- return 0;
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task OperatorTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- MyStruct(int value) : value(value)
- {
- }
-
- MyStruct operator+(MyStruct rhs)
- {
- return MyStruct(value + rhs.value);
- }
-};
-
-MyStruct operator-(MyStruct lhs, MyStruct rhs)
-{
- return MyStruct(lhs.value - rhs.value);
-}
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- void
-
- int
-
-
- value
-
-
-
-
- MyStruct
-
- MyStruct
-
- return new MyStruct(value + rhs.value);
-
-
-
-
- MyStruct
-
- MyStruct
-
-
- MyStruct
-
- return new MyStruct(lhs.value - rhs.value);
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task OperatorCallTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- MyStruct(int value) : value(value)
- {
- }
-
- MyStruct operator+(MyStruct rhs)
- {
- return MyStruct(value + rhs.value);
- }
-};
-
-MyStruct MyFunction1(MyStruct lhs, MyStruct rhs)
-{
- return lhs + rhs;
-}
-
-MyStruct operator-(MyStruct lhs, MyStruct rhs)
-{
- return MyStruct(lhs.value - rhs.value);
-}
-
-MyStruct MyFunction2(MyStruct lhs, MyStruct rhs)
-{
- return lhs - rhs;
-}
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- void
-
- int
-
-
- value
-
-
-
-
- MyStruct
-
- MyStruct
-
- return new MyStruct(value + rhs.value);
-
-
-
-
- MyStruct
-
- MyStruct
-
-
- MyStruct
-
- return lhs.Add(rhs);
-
-
- MyStruct
-
- MyStruct
-
-
- MyStruct
-
- return new MyStruct(lhs.value - rhs.value);
-
-
- MyStruct
-
- MyStruct
-
-
- MyStruct
-
- return Subtract(lhs, rhs);
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task ThisTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- int value;
-
- int MyFunction()
- {
- return this->value;
- }
-};
-";
-
- var expectedOutputContents = @"
-
-
-
-
- int
-
-
- int
- return this.value;
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-
- protected override Task UnsafeDoesNotImpactDllImportTestImpl()
- {
- var inputContents = @"struct MyStruct
-{
- void* MyVoidStarMethod()
- {
- return nullptr;
- }
-};
-
-extern ""C"" void MyFunction();";
-
- var expectedOutputContents = @"
-
-
-
-
- void*
- return null;
-
-
-
-
- void
-
-
-
-
-";
-
- return ValidateBindingsAsync(inputContents, expectedOutputContents);
- }
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/DeprecatedToObsoleteTest.cs
deleted file mode 100644
index f062c262..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/DeprecatedToObsoleteTest.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class DeprecatedToObsoleteTest : PInvokeGeneratorTest
-{
- [TestCase("int", "int")]
- public Task SimpleStructMembers(string nativeType, string expectedManagedType) => SimpleStructMembersImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task StructDecl() => StructDeclImpl();
-
- [TestCase("int", "int")]
- public Task SimpleTypedefStructMembers(string nativeType, string expectedManagedType) => SimpleTypedefStructMembersImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task TypedefStructDecl() => TypedefStructDeclImpl();
-
- [Test]
- public Task SimpleEnumMembers() => SimpleEnumMembersImpl();
-
- [Test]
- public Task EnumDecl() => EnumDeclImpl();
-
- [TestCase("int", "int")]
- public Task SimpleVarDecl(string nativeType, string expectedManagedType) => SimpleVarDeclImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task FuncDecl() => FuncDeclImpl();
-
- [Test]
- public Task InstanceFunc() => InstanceFuncImpl();
-
- [Test]
- public Task FuncPtrDecl() => FuncPtrDeclImpl();
-
- [Test]
- public Task FuncDeclDllImport() => FuncDllImportImpl();
-
- protected abstract Task SimpleStructMembersImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task StructDeclImpl();
-
- protected abstract Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task TypedefStructDeclImpl();
-
- protected abstract Task SimpleEnumMembersImpl();
-
- protected abstract Task EnumDeclImpl();
-
- protected abstract Task SimpleVarDeclImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FuncDeclImpl();
-
- protected abstract Task InstanceFuncImpl();
-
- protected abstract Task FuncPtrDeclImpl();
-
- protected abstract Task FuncDllImportImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/DigitsSeparatorTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/DigitsSeparatorTest.cs
deleted file mode 100644
index baffbb92..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/DigitsSeparatorTest.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class DigitsSeparatorTest : PInvokeGeneratorTest
-{
- [TestCase("int", "1'024", "1_024")]
- [TestCase("int", "1'000'001", "1_000_001")]
- [TestCase("float", "1'024", "1_024")]
- [TestCase("float", "1'024.0", "1_024.0")]
- public Task StaticConstExprTest(string type, string nativeValue, string expectedValue) => StaticConstExprTestImpl(type, nativeValue, expectedValue);
-
- protected abstract Task StaticConstExprTestImpl(string type, string nativeValue, string expectedValue);
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/EnumDeclarationTest.cs
deleted file mode 100644
index 1048a150..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/EnumDeclarationTest.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class EnumDeclarationTest : PInvokeGeneratorTest
-{
- protected static readonly string[] ExcludeTestExcludedNames = ["MyEnum"];
-
- [Test]
- public Task BasicTest() => BasicTestImpl();
-
- [Test]
- public Task BasicValueTest() => BasicValueTestImpl();
-
- [Test]
- public Task ExcludeTest() => ExcludeTestImpl();
-
- [TestCase("short", "short")]
- public Task ExplicitTypedTest(string nativeType, string expectedManagedType) => ExplicitTypedTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task ExplicitTypedWithNativeTypeNameTest(string nativeType, string expectedManagedType) => ExplicitTypedWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task RemapTest() => RemapTestImpl();
-
- [Test]
- public Task WithAttributeTest() => WithAttributeTestImpl();
-
- [Test]
- public Task WithNamespaceTest() => WithNamespaceTestImpl();
-
- [Test]
- public Task WithNamespaceStarTest() => WithNamespaceStarTestImpl();
-
- [Test]
- public Task WithNamespaceStarPlusTest() => WithNamespaceStarPlusTestImpl();
-
- [Test]
- public Task WithCastToEnumType() => WithCastToEnumTypeImpl();
-
- [Test]
- public Task WithMultipleEnumsTest() => WithMultipleEnumsTestImpl();
-
- [Test]
- public Task WithImplicitConversionTest() => WithImplicitConversionTestImpl();
-
- [Test]
- public Task WithTypeTest() => WithTypeTestImpl();
-
- [Test]
- public Task WithTypeAndImplicitConversionTest() => WithTypeAndImplicitConversionTestImpl();
-
- [Test]
- public Task WithTypeStarTest() => WithTypeStarTestImpl();
-
- [Test]
- public Task WithTypeStarOverrideTest() => WithTypeStarOverrideTestImpl();
-
- [Test]
- public Task WithAnonymousEnumTest() => WithAnonymousEnumTestImpl();
-
- [Test]
- public Task WithReferenceToAnonymousEnumEnumeratorTest() => WithReferenceToAnonymousEnumEnumeratorTestImpl();
-
- protected abstract Task BasicTestImpl();
-
- protected abstract Task BasicValueTestImpl();
-
- protected abstract Task ExcludeTestImpl();
-
- protected abstract Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
-
- protected abstract Task RemapTestImpl();
-
- protected abstract Task WithAttributeTestImpl();
-
- protected abstract Task WithNamespaceTestImpl();
-
- protected abstract Task WithNamespaceStarTestImpl();
-
- protected abstract Task WithNamespaceStarPlusTestImpl();
-
- protected abstract Task WithCastToEnumTypeImpl();
-
- protected abstract Task WithMultipleEnumsTestImpl();
-
- protected abstract Task WithImplicitConversionTestImpl();
-
- protected abstract Task WithTypeTestImpl();
-
- protected abstract Task WithTypeAndImplicitConversionTestImpl();
-
- protected abstract Task WithTypeStarTestImpl();
-
- protected abstract Task WithTypeStarOverrideTestImpl();
-
- protected abstract Task WithAnonymousEnumTestImpl();
-
- protected abstract Task WithReferenceToAnonymousEnumEnumeratorTestImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationBodyImportTest.cs
deleted file mode 100644
index 52727f75..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationBodyImportTest.cs
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class FunctionDeclarationBodyImportTest : PInvokeGeneratorTest
-{
- [Test]
- public Task AccessUnionMemberTest() => AccessUnionMemberTestImpl();
-
- [Test]
- public Task ArraySubscriptTest() => ArraySubscriptTestImpl();
-
- [Test]
- public Task BasicTest() => BasicTestImpl();
-
- [TestCase("%")]
- [TestCase("%=")]
- [TestCase("&")]
- [TestCase("&=")]
- [TestCase("*")]
- [TestCase("*=")]
- [TestCase("+")]
- [TestCase("+=")]
- [TestCase("-")]
- [TestCase("-=")]
- [TestCase("/")]
- [TestCase("/=")]
- [TestCase("<<")]
- [TestCase("<<=")]
- [TestCase("=")]
- [TestCase(">>")]
- [TestCase(">>=")]
- [TestCase("^")]
- [TestCase("^=")]
- [TestCase("|")]
- [TestCase("|=")]
- public Task BinaryOperatorBasicTest(string opcode) => BinaryOperatorBasicTestImpl(opcode);
-
- [TestCase("==")]
- [TestCase("!=")]
- [TestCase("<")]
- [TestCase("<=")]
- [TestCase(">")]
- [TestCase(">=")]
- public Task BinaryOperatorCompareTest(string opcode) => BinaryOperatorCompareTestImpl(opcode);
-
- [TestCase("&&")]
- [TestCase("||")]
- public Task BinaryOperatorBooleanTest(string opcode) => BinaryOperatorBooleanTestImpl(opcode);
-
- [Test]
- public Task BreakTest() => BreakTestImpl();
-
- [Test]
- public Task CallFunctionTest() => CallFunctionTestImpl();
-
- [Test]
- public Task CallFunctionWithArgsTest() => CallFunctionWithArgsTestImpl();
-
- [Test]
- public Task CaseTest() => CaseTestImpl();
-
- [Test]
- public Task CaseNoCompoundTest() => CaseNoCompoundTestImpl();
-
- [Test]
- public Task CompareMultipleEnumTest() => CompareMultipleEnumTestImpl();
-
- [Test]
- public Task ConditionalOperatorTest() => ConditionalOperatorTestImpl();
-
- [Test]
- public Task ContinueTest() => ContinueTestImpl();
-
- [Test]
- public Task CStyleFunctionalCastTest() => CStyleFunctionalCastTestImpl();
-
- [Test]
- public Task CxxFunctionalCastTest() => CxxFunctionalCastTestImpl();
-
- [Test]
- public Task CxxConstCastTest() => CxxConstCastTestImpl();
-
- [Test]
- public Task CxxDynamicCastTest() => CxxDynamicCastTestImpl();
-
- [Test]
- public Task CxxReinterpretCastTest() => CxxReinterpretCastTestImpl();
-
- [Test]
- public Task CxxStaticCastTest() => CxxStaticCastTestImpl();
-
- [Test]
- public Task DeclTest() => DeclTestImpl();
-
- [Test]
- public Task DoTest() => DoTestImpl();
-
- [Test]
- public Task DoNonCompoundTest() => DoNonCompoundTestImpl();
-
- [Test]
- public Task ForTest() => ForTestImpl();
-
- [Test]
- public Task ForNonCompoundTest() => ForNonCompoundTestImpl();
-
- [Test]
- public Task IfTest() => IfTestImpl();
-
- [Test]
- public Task IfElseTest() => IfElseTestImpl();
-
- [Test]
- public Task IfElseIfTest() => IfElseIfTestImpl();
-
- [Test]
- public Task IfElseNonCompoundTest() => IfElseNonCompoundTestImpl();
-
- [Test]
- public Task InitListForArrayTest() => InitListForArrayTestImpl();
-
- [Test]
- public Task InitListForRecordDeclTest() => InitListForRecordDeclTestImpl();
-
- [Test]
- public Task MemberTest() => MemberTestImpl();
-
- [Test]
- public Task RefToPtrTest() => RefToPtrTestImpl();
-
- [Test]
- public Task ReturnCXXNullPtrTest() => ReturnCXXNullPtrTestImpl();
-
- [TestCase("false")]
- [TestCase("true")]
- public Task ReturnCXXBooleanLiteralTest(string value) => ReturnCXXBooleanLiteralTestImpl(value);
-
- [TestCase("5e-1")]
- [TestCase("3.14")]
- public Task ReturnFloatingLiteralDoubleTest(string value) => ReturnFloatingLiteralDoubleTestImpl(value);
-
- [TestCase("5e-1f")]
- [TestCase("3.14f")]
- public Task ReturnFloatingLiteralSingleTest(string value) => ReturnFloatingLiteralSingleTestImpl(value);
-
- [Test]
- public Task ReturnEmptyTest() => ReturnEmptyTestImpl();
-
- [Test]
- public Task ReturnIntegerLiteralInt32Test() => ReturnIntegerLiteralInt32TestImpl();
-
- [Test]
- public Task ReturnStructTest() => ReturnStructTestImpl();
-
- [Test]
- public Task SwitchTest() => SwitchTestImpl();
-
- [Test]
- public Task SwitchNonCompoundTest() => SwitchNonCompoundTestImpl();
-
- [Test]
- public Task UnaryOperatorAddrOfTest() => UnaryOperatorAddrOfTestImpl();
-
- [Test]
- public Task UnaryOperatorDerefTest() => UnaryOperatorDerefTestImpl();
-
- [Test]
- public Task UnaryOperatorLogicalNotTest() => UnaryOperatorLogicalNotTestImpl();
-
- [TestCase("++")]
- [TestCase("--")]
- public Task UnaryOperatorPostfixTest(string opcode) => UnaryOperatorPostfixTestImpl(opcode);
-
- [TestCase("+")]
- [TestCase("++")]
- [TestCase("-")]
- [TestCase("--")]
- [TestCase("~")]
- public Task UnaryOperatorPrefixTest(string opcode) => UnaryOperatorPrefixTestImpl(opcode);
-
- [Test]
- public Task WhileTest() => WhileTestImpl();
-
- [Test]
- public Task WhileNonCompoundTest() => WhileNonCompoundTestImpl();
-
- protected abstract Task AccessUnionMemberTestImpl();
-
- protected abstract Task ArraySubscriptTestImpl();
-
- protected abstract Task BasicTestImpl();
-
- protected abstract Task BinaryOperatorBasicTestImpl(string opcode);
-
- protected abstract Task BinaryOperatorCompareTestImpl(string opcode);
-
- protected abstract Task BinaryOperatorBooleanTestImpl(string opcode);
-
- protected abstract Task BreakTestImpl();
-
- protected abstract Task CallFunctionTestImpl();
-
- protected abstract Task CallFunctionWithArgsTestImpl();
-
- protected abstract Task CaseTestImpl();
-
- protected abstract Task CaseNoCompoundTestImpl();
-
- protected abstract Task CompareMultipleEnumTestImpl();
-
- protected abstract Task ConditionalOperatorTestImpl();
-
- protected abstract Task ContinueTestImpl();
-
- protected abstract Task CStyleFunctionalCastTestImpl();
-
- protected abstract Task CxxFunctionalCastTestImpl();
-
- protected abstract Task CxxConstCastTestImpl();
-
- protected abstract Task CxxDynamicCastTestImpl();
-
- protected abstract Task CxxReinterpretCastTestImpl();
-
- protected abstract Task CxxStaticCastTestImpl();
-
- protected abstract Task DeclTestImpl();
-
- protected abstract Task DoTestImpl();
-
- protected abstract Task DoNonCompoundTestImpl();
-
- protected abstract Task ForTestImpl();
-
- protected abstract Task ForNonCompoundTestImpl();
-
- protected abstract Task IfTestImpl();
-
- protected abstract Task IfElseTestImpl();
-
- protected abstract Task IfElseIfTestImpl();
-
- protected abstract Task IfElseNonCompoundTestImpl();
-
- protected abstract Task InitListForArrayTestImpl();
-
- protected abstract Task InitListForRecordDeclTestImpl();
-
- protected abstract Task MemberTestImpl();
-
- protected abstract Task RefToPtrTestImpl();
-
- protected abstract Task ReturnCXXNullPtrTestImpl();
-
- protected abstract Task ReturnCXXBooleanLiteralTestImpl(string value);
-
- protected abstract Task ReturnFloatingLiteralDoubleTestImpl(string value);
-
- protected abstract Task ReturnFloatingLiteralSingleTestImpl(string value);
-
- protected abstract Task ReturnEmptyTestImpl();
-
- protected abstract Task ReturnIntegerLiteralInt32TestImpl();
-
- protected abstract Task ReturnStructTestImpl();
-
- protected abstract Task SwitchTestImpl();
-
- protected abstract Task SwitchNonCompoundTestImpl();
-
- protected abstract Task UnaryOperatorAddrOfTestImpl();
-
- protected abstract Task UnaryOperatorDerefTestImpl();
-
- protected abstract Task UnaryOperatorLogicalNotTestImpl();
-
- protected abstract Task UnaryOperatorPostfixTestImpl(string opcode);
-
- protected abstract Task UnaryOperatorPrefixTestImpl(string opcode);
-
- protected abstract Task WhileTestImpl();
-
- protected abstract Task WhileNonCompoundTestImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationDllImportTest.cs
deleted file mode 100644
index 763a04f9..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationDllImportTest.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class FunctionDeclarationDllImportTest : PInvokeGeneratorTest
-{
- protected static readonly string[] TemplateTestExcludedNames = ["MyTemplate"];
-
- [Test]
- public Task BasicTest() => BasicTestImpl();
-
- [Test]
- public Task ArrayParameterTest() => ArrayParameterTestImpl();
-
- [Test]
- public Task FunctionPointerParameterTest() => FunctionPointerParameterTestImpl();
-
- [Test]
- public Task NamespaceTest() => NamespaceTestImpl();
-
- [TestCase("int", false, "int", "")]
- [TestCase("bool", true, "byte", "")]
- [TestCase("float *", true, "IntPtr", "using System;\n")]
- [TestCase("void (*)(int)", true, "IntPtr", "using System;\n")]
- public Task TemplateParameterTest(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) => TemplateParameterTestImpl(nativeType, expectedNativeTypeAttr, expectedManagedType, expectedUsingStatement);
-
- [Test]
- public Task TemplateMemberTest() => TemplateMemberTestImpl();
-
-
- [Test]
- public Task NoLibraryPathTest() => NoLibraryPathTestImpl();
-
- [Test]
- public Task WithLibraryPathTest() => WithLibraryPathTestImpl();
-
- [Test]
- public Task WithLibraryPathStarTest() => WithLibraryPathStarTestImpl();
-
- [TestCase("unsigned char", "0", true, "byte", "0")]
- [TestCase("double", "1.0", false, "double", "1.0")]
- [TestCase("short", "2", false, "short", "2")]
- [TestCase("int", "3", false, "int", "3")]
- [TestCase("long long", "4", true, "long", "4")]
- [TestCase("signed char", "5", true, "sbyte", "5")]
- [TestCase("float", "6.0f", false, "float", "6.0f")]
- [TestCase("unsigned short", "7", true, "ushort", "7")]
- [TestCase("unsigned int", "8", true, "uint", "8")]
- [TestCase("unsigned long long", "9", true, "ulong", "9")]
- [TestCase("unsigned short", "'A'", true, "ushort", "(byte)('A')")]
- public Task OptionalParameterTest(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) => OptionalParameterTestImpl(nativeType, nativeInit, expectedNativeTypeNameAttr, expectedManagedType, expectedManagedInit);
-
- [TestCase("void *", "nullptr", "void*", "null")]
- [TestCase("void *", "0", "void*", "null")]
- public Task OptionalParameterUnsafeTest(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) => OptionalParameterUnsafeTestImpl(nativeType, nativeInit, expectedManagedType, expectedManagedInit);
-
- [Test]
- public Task WithCallConvTest() => WithCallConvTestImpl();
-
- [Test]
- public Task WithCallConvStarTest() => WithCallConvStarTestImpl();
-
- [Test]
- public Task WithCallConvStarOverrideTest() => WithCallConvStarOverrideTestImpl();
-
- [Test]
- public Task WithSetLastErrorTest() => WithSetLastErrorTestImpl();
-
- [Test]
- public Task WithSetLastErrorStarTest() => WithSetLastErrorStarTestImpl();
-
- [Test]
- public Task SourceLocationTest() => SourceLocationTestImpl();
-
- [Test]
- public Task VarargsTest() => VarargsTestImpl();
-
- [Test]
- public Task IntrinsicsTest() => IntrinsicsTestImpl();
-
- protected abstract Task BasicTestImpl();
-
- protected abstract Task ArrayParameterTestImpl();
-
- protected abstract Task FunctionPointerParameterTestImpl();
-
- protected abstract Task NamespaceTestImpl();
-
- protected abstract Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement);
-
- protected abstract Task TemplateMemberTestImpl();
-
- protected abstract Task NoLibraryPathTestImpl();
-
- protected abstract Task WithLibraryPathTestImpl();
-
- protected abstract Task WithLibraryPathStarTestImpl();
-
- protected abstract Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit);
-
- protected abstract Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit);
-
- protected abstract Task WithCallConvTestImpl();
-
- protected abstract Task WithCallConvStarTestImpl();
-
- protected abstract Task WithCallConvStarOverrideTestImpl();
-
- protected abstract Task WithSetLastErrorTestImpl();
-
- protected abstract Task WithSetLastErrorStarTestImpl();
-
- protected abstract Task SourceLocationTestImpl();
-
- protected abstract Task VarargsTestImpl();
-
- protected abstract Task IntrinsicsTestImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionPointerDeclarationTest.cs
deleted file mode 100644
index 7938c6b1..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionPointerDeclarationTest.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class FunctionPointerDeclarationTest : PInvokeGeneratorTest
-{
- [Test]
- public Task BasicTest() => BasicTestImpl();
-
- [Test]
- public Task CallconvTest() => CallconvTestImpl();
-
- [Test]
- public Task PointerlessTypedefTest() => PointerlessTypedefTestImpl();
-
- protected abstract Task BasicTestImpl();
-
- protected abstract Task CallconvTestImpl();
-
- protected abstract Task PointerlessTypedefTestImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/StructDeclarationTest.cs
deleted file mode 100644
index 8561f15f..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/StructDeclarationTest.cs
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class StructDeclarationTest : PInvokeGeneratorTest
-{
- protected static readonly string[] ExcludeTestExcludedNames = ["MyStruct"];
- protected static readonly string[] GuidTestExcludedNames = ["DECLSPEC_UUID"];
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task IncompleteArraySizeTest(string nativeType, string expectedManagedType) => IncompleteArraySizeTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task BasicTest(string nativeType, string expectedManagedType) => BasicTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task BasicTestInCMode(string nativeType, string expectedManagedType) => BasicTestInCModeImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task BasicWithNativeTypeNameTest(string nativeType, string expectedManagedType) => BasicWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task BitfieldTest() => BitfieldTestImpl();
-
- [Test]
- public Task BitfieldWithNativeBitfieldAttributeTest() => BitfieldWithNativeBitfieldAttributeTestImpl();
-
- [Test]
- public Task DeclTypeTest() => DeclTypeTestImpl();
-
- [Test]
- public Task ExcludeTest() => ExcludeTestImpl();
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task FixedSizedBufferNonPrimitiveTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task FixedSizedBufferNonPrimitiveMultidimensionalTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task FixedSizedBufferNonPrimitiveTypedefTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveTypedefTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double *", "double*")]
- [TestCase("short *", "short*")]
- [TestCase("int *", "int*")]
- [TestCase("float *", "float*")]
- public Task FixedSizedBufferPointerTest(string nativeType, string expectedManagedType) => FixedSizedBufferPointerTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task FixedSizedBufferPrimitiveTest(string nativeType, string expectedManagedType) => FixedSizedBufferPrimitiveTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task FixedSizedBufferPrimitiveMultidimensionalTest(string nativeType, string expectedManagedType) => FixedSizedBufferPrimitiveMultidimensionalTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task FixedSizedBufferPrimitiveTypedefTest(string nativeType, string expectedManagedType) => FixedSizedBufferPrimitiveTypedefTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task GuidTest() => GuidTestImpl();
-
- [Test]
- public Task InheritanceTest() => InheritanceTestImpl();
-
- [Test]
- public Task InheritanceWithNativeInheritanceAttributeTest() => InheritanceWithNativeInheritanceAttributeTestImpl();
-
- [TestCase("double", "double", 10, 5)]
- [TestCase("short", "short", 10, 5)]
- [TestCase("int", "int", 10, 5)]
- [TestCase("float", "float", 10, 5)]
- public Task NestedAnonymousTest(string nativeType, string expectedManagedType, int line, int column) => NestedAnonymousTestImpl(nativeType, expectedManagedType, line, column);
-
- [Test]
- public Task NestedAnonymousWithBitfieldTest() => NestedAnonymousWithBitfieldTestImpl();
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task NestedTest(string nativeType, string expectedManagedType) => NestedTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task NestedWithNativeTypeNameTest(string nativeType, string expectedManagedType) => NestedWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task NewKeywordTest() => NewKeywordTestImpl();
-
- [Test]
- public Task NoDefinitionTest() => NoDefinitionTestImpl();
-
- [Test]
- public Task PackTest() => PackTestImpl();
-
- [Test]
- public Task PointerToSelfTest() => PointerToSelfTestImpl();
-
- [Test]
- public Task PointerToSelfViaTypedefTest() => PointerToSelfViaTypedefTestImpl();
-
- [Test]
- public Task RemapTest() => RemapTestImpl();
-
- [Test]
- public Task RemapNestedAnonymousTest() => RemapNestedAnonymousTestImpl();
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task SkipNonDefinitionTest(string nativeType, string expectedManagedType) => SkipNonDefinitionTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task SkipNonDefinitionPointerTest() => SkipNonDefinitionPointerTestImpl();
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task SkipNonDefinitionWithNativeTypeNameTest(string nativeType, string expectedManagedType) => SkipNonDefinitionWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task TypedefTest(string nativeType, string expectedManagedType) => TypedefTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task UsingDeclarationTest() => UsingDeclarationTestImpl();
-
- [Test]
- public Task WithAccessSpecifierTest() => WithAccessSpecifierTestImpl();
-
- [Test]
- public Task WithPackingTest() => WithPackingTestImpl();
-
- [Test]
- public Task SourceLocationAttributeTest() => SourceLocationAttributeTestImpl();
-
- // Regression test: the code that generated the name for anonymous types had a couple of
- // bugs:
- // * It would only append a numeral if the parent had more than one anonymous records,
- // but an anonymous typed array didn't count as a record resulting in multiple structs
- // named `_Anonymous_e__Struct`.
- // * The code that remapped the name of anonymous types was different between the code that
- // generated the type definition and the code that defined fields in a FixedBuffer.
- [Test]
- public Task AnonStructAndAnonStructArray() => AnonStructAndAnonStructArrayImpl();
-
- // Regression test: nested anonymous structs would result in:
- // error CS0542: '_Anonymous_e__Struct': member names cannot be the same as their enclosing type
- [Test]
- public Task DeeplyNestedAnonStructs() => DeeplyNestedAnonStructsImpl();
-
- protected abstract Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BasicTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BasicTestInCModeImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BitfieldTestImpl();
-
- protected abstract Task BitfieldWithNativeBitfieldAttributeTestImpl();
-
- protected abstract Task DeclTypeTestImpl();
-
- protected abstract Task ExcludeTestImpl();
-
- protected abstract Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task GuidTestImpl();
-
- protected abstract Task InheritanceTestImpl();
-
- protected abstract Task InheritanceWithNativeInheritanceAttributeTestImpl();
-
- protected abstract Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column);
-
- protected abstract Task NestedAnonymousWithBitfieldTestImpl();
-
- protected abstract Task NestedTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task NewKeywordTestImpl();
-
- protected abstract Task NoDefinitionTestImpl();
-
- protected abstract Task PackTestImpl();
-
- protected abstract Task PointerToSelfTestImpl();
-
- protected abstract Task PointerToSelfViaTypedefTestImpl();
-
- protected abstract Task RemapTestImpl();
-
- protected abstract Task RemapNestedAnonymousTestImpl();
-
- protected abstract Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task SkipNonDefinitionPointerTestImpl();
-
- protected abstract Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task TypedefTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task UsingDeclarationTestImpl();
-
- protected abstract Task WithAccessSpecifierTestImpl();
-
- protected abstract Task WithPackingTestImpl();
-
- protected abstract Task SourceLocationAttributeTestImpl();
-
- protected abstract Task AnonStructAndAnonStructArrayImpl();
-
- protected abstract Task DeeplyNestedAnonStructsImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/UnionDeclarationTest.cs
deleted file mode 100644
index f6ff2143..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/UnionDeclarationTest.cs
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class UnionDeclarationTest : PInvokeGeneratorTest
-{
- protected static readonly string[] ExcludeTestExcludedNames = ["MyUnion"];
- protected static readonly string[] GuidTestExcludedNames = ["DECLSPEC_UUID"];
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task BasicTest(string nativeType, string expectedManagedType) => BasicTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task BasicTestInCMode(string nativeType, string expectedManagedType) => BasicTestInCModeImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task BasicWithNativeTypeNameTest(string nativeType, string expectedManagedType) => BasicWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task BitfieldTest() => BitfieldTestImpl();
-
- [Test]
- public Task ExcludeTest() => ExcludeTestImpl();
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task FixedSizedBufferNonPrimitiveTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task FixedSizedBufferNonPrimitiveMultidimensionalTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task FixedSizedBufferNonPrimitiveTypedefTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveTypedefTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTest(string nativeType, string expectedManagedType) => FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [TestCase("double *", "double*")]
- [TestCase("short *", "short*")]
- [TestCase("int *", "int*")]
- [TestCase("float *", "float*")]
- public Task FixedSizedBufferPointerTest(string nativeType, string expectedManagedType) => FixedSizedBufferPointerTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task FixedSizedBufferPrimitiveTest(string nativeType, string expectedManagedType) => FixedSizedBufferPrimitiveTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task FixedSizedBufferPrimitiveMultidimensionalTest(string nativeType, string expectedManagedType) => FixedSizedBufferPrimitiveMultidimensionalTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task FixedSizedBufferPrimitiveTypedefTest(string nativeType, string expectedManagedType) => FixedSizedBufferPrimitiveTypedefTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task GuidTest() => GuidTestImpl();
-
- [TestCase("double", "double", 11, 5)]
- [TestCase("short", "short", 11, 5)]
- [TestCase("int", "int", 11, 5)]
- [TestCase("float", "float", 11, 5)]
- public Task NestedAnonymousTest(string nativeType, string expectedManagedType, int line, int column) => NestedAnonymousTestImpl(nativeType, expectedManagedType, line, column);
-
- [Test]
- public Task NestedAnonymousWithBitfieldTest() => NestedAnonymousWithBitfieldTestImpl();
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task NestedTest(string nativeType, string expectedManagedType) => NestedTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task NestedWithNativeTypeNameTest(string nativeType, string expectedManagedType) => NestedWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task NewKeywordTest() => NewKeywordTestImpl();
-
- [Test]
- public Task NoDefinitionTest() => NoDefinitionTestImpl();
-
- [Test]
- public Task PointerToSelfTest() => PointerToSelfTestImpl();
-
- [Test]
- public Task PointerToSelfViaTypedefTest() => PointerToSelfViaTypedefTestImpl();
-
- [Test]
- public Task RemapTest() => RemapTestImpl();
-
- [Test]
- public Task RemapNestedAnonymousTest() => RemapNestedAnonymousTestImpl();
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task SkipNonDefinitionTest(string nativeType, string expectedManagedType) => SkipNonDefinitionTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task SkipNonDefinitionPointerTest() => SkipNonDefinitionPointerTestImpl();
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task SkipNonDefinitionWithNativeTypeNameTest(string nativeType, string expectedManagedType) => SkipNonDefinitionWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("float", "float")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- [TestCase("bool", "byte")]
- public Task TypedefTest(string nativeType, string expectedManagedType) => TypedefTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task UnionWithAnonStructWithAnonUnion() => UnionWithAnonStructWithAnonUnionImpl();
-
- protected abstract Task BasicTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BasicTestInCModeImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BitfieldTestImpl();
-
- protected abstract Task ExcludeTestImpl();
-
- protected abstract Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task GuidTestImpl();
-
- protected abstract Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column);
-
- protected abstract Task NestedAnonymousWithBitfieldTestImpl();
-
- protected abstract Task NestedTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task NewKeywordTestImpl();
-
- protected abstract Task NoDefinitionTestImpl();
-
- protected abstract Task PointerToSelfTestImpl();
-
- protected abstract Task PointerToSelfViaTypedefTestImpl();
-
- protected abstract Task RemapTestImpl();
-
- protected abstract Task RemapNestedAnonymousTestImpl();
-
- protected abstract Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task SkipNonDefinitionPointerTestImpl();
-
- protected abstract Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task TypedefTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task UnionWithAnonStructWithAnonUnionImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/VarDeclarationTest.cs
deleted file mode 100644
index 2cc3ea7e..00000000
--- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/VarDeclarationTest.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
-
-using System.Threading.Tasks;
-using NUnit.Framework;
-
-namespace ClangSharp.UnitTests;
-
-public abstract class VarDeclarationTest : PInvokeGeneratorTest
-{
- protected static readonly string[] GuidMacroTestExcludedNames = ["GUID"];
- protected static readonly string[] UncheckedConversionMacroTest2ExcludedNames = ["MyMacro1", "MyMacro2"];
-
- [TestCase("double", "double")]
- [TestCase("short", "short")]
- [TestCase("int", "int")]
- [TestCase("float", "float")]
- public Task BasicTest(string nativeType, string expectedManagedType) => BasicTestImpl(nativeType, expectedManagedType);
-
- [TestCase("unsigned char", "byte")]
- [TestCase("long long", "long")]
- [TestCase("signed char", "sbyte")]
- [TestCase("unsigned short", "ushort")]
- [TestCase("unsigned int", "uint")]
- [TestCase("unsigned long long", "ulong")]
- public Task BasicWithNativeTypeNameTest(string nativeType, string expectedManagedType) => BasicWithNativeTypeNameTestImpl(nativeType, expectedManagedType);
-
- [Test]
- public Task GuidMacroTest() => GuidMacroTestImpl();
-
- [TestCase("0", "int", "0")]
- [TestCase("0U", "uint", "0U")]
- [TestCase("0LL", "long", "0L")]
- [TestCase("0ULL", "ulong", "0UL")]
- [TestCase("0LLU", "ulong", "0UL")]
- [TestCase("0.0", "double", "0.0")]
- [TestCase("0.f", "float", "0.0f")]
- public Task MacroTest(string nativeValue, string expectedManagedType, string expectedManagedValue) => MacroTestImpl(nativeValue, expectedManagedType, expectedManagedValue);
-
- [Test]
- public Task MultilineMacroTest() => MultilineMacroTestImpl();
-
- [TestCase("double")]
- [TestCase("short")]
- [TestCase("int")]
- [TestCase("float")]
- public Task NoInitializerTest(string nativeType) => NoInitializerTestImpl(nativeType);
-
- [Test]
- public Task Utf8StringLiteralMacroTest() => Utf8StringLiteralMacroTestImpl();
-
- [Test]
- public Task Utf16StringLiteralMacroTest() => Utf16StringLiteralMacroTestImpl();
-
- [Test]
- public Task WideStringLiteralConstTest() => WideStringLiteralConstTestImpl();
-
- [Test]
- public Task StringLiteralConstTest() => StringLiteralConstTestImpl();
-
- [Test]
- public Task WideStringLiteralStaticConstTest() => WideStringLiteralStaticConstTestImpl();
-
- [Test]
- public Task StringLiteralStaticConstTest() => StringLiteralStaticConstTestImpl();
-
- [Test]
- public Task UncheckedConversionMacroTest() => UncheckedConversionMacroTestImpl();
-
- [Test]
- public Task UncheckedFunctionLikeCastMacroTest() => UncheckedFunctionLikeCastMacroTestImpl();
-
- [Test]
- public Task UncheckedConversionMacroTest2() => UncheckedConversionMacroTest2Impl();
-
- [Test]
- public Task UncheckedPointerMacroTest() => UncheckedPointerMacroTestImpl();
-
- [Test]
- public Task UncheckedReinterpretCastMacroTest() => UncheckedReinterpretCastMacroTestImpl();
-
- [Test]
- public Task MultidimensionlArrayTest() => MultidimensionlArrayTestImpl();
-
- [Test]
- public Task ConditionalDefineConstTest() => ConditionalDefineConstTestImpl();
-
- [Test]
- public Task UndefinedFunctionLikeMacroTest() => UndefinedFunctionLikeMacroTestImpl();
-
- protected abstract Task BasicTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType);
-
- protected abstract Task GuidMacroTestImpl();
-
- protected abstract Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue);
-
- protected abstract Task MultilineMacroTestImpl();
-
- protected abstract Task NoInitializerTestImpl(string nativeType);
-
- protected abstract Task Utf8StringLiteralMacroTestImpl();
-
- protected abstract Task Utf16StringLiteralMacroTestImpl();
-
- protected abstract Task WideStringLiteralConstTestImpl();
-
- protected abstract Task StringLiteralConstTestImpl();
-
- protected abstract Task WideStringLiteralStaticConstTestImpl();
-
- protected abstract Task StringLiteralStaticConstTestImpl();
-
- protected abstract Task UncheckedConversionMacroTestImpl();
-
- protected abstract Task UncheckedFunctionLikeCastMacroTestImpl();
-
- protected abstract Task UncheckedConversionMacroTest2Impl();
-
- protected abstract Task UncheckedPointerMacroTestImpl();
-
- protected abstract Task UncheckedReinterpretCastMacroTestImpl();
-
- protected abstract Task MultidimensionlArrayTestImpl();
-
- protected abstract Task ConditionalDefineConstTestImpl();
-
- protected abstract Task UndefinedFunctionLikeMacroTestImpl();
-}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineAssertions.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineAssertions.cs
new file mode 100644
index 00000000..9ab3effb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineAssertions.cs
@@ -0,0 +1,31 @@
+// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
+
+using System.IO;
+using System.Threading.Tasks;
+using NUnit.Framework;
+
+namespace ClangSharp.UnitTests.Baseline;
+
+// Shared baseline read/write core used by both the matrix-parameterized BaselineTest and the
+// single-variant StandaloneBaselineTest. Given the already-generated output for a case+variant, it either
+// (re)writes the checked-in baseline under UPDATE_BASELINES, or resolves the baseline via the fallback
+// chain and asserts byte-for-byte equality.
+internal static class BaselineAssertions
+{
+ public static async Task AssertOrUpdateAsync(string area, string caseName, BaselineVariant variant, string actual)
+ {
+ if (BaselineHarness.ShouldUpdateBaselines)
+ {
+ var path = BaselineHarness.MostSpecificPath(area, caseName, variant);
+ _ = Directory.CreateDirectory(Path.GetDirectoryName(path)!);
+ await File.WriteAllTextAsync(path, actual).ConfigureAwait(false);
+ return;
+ }
+
+ var resolved = BaselineHarness.ResolveBaselinePath(area, caseName, variant);
+ Assert.That(resolved, Is.Not.Null, $"No baseline found for case '{caseName}' variant '{variant}'. Run with UPDATE_BASELINES=1 (Windows variants) or seed from the legacy tests (Unix variants).");
+
+ var expected = await File.ReadAllTextAsync(resolved!).ConfigureAwait(false);
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineHarness.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineHarness.cs
new file mode 100644
index 00000000..dca097c2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineHarness.cs
@@ -0,0 +1,226 @@
+// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.UnitTests.Baseline;
+
+// Baseline harness (Approach 2): checked-in baseline files resolved with a
+// {Case}.{Mode}.{Config}.{OS} -> {Case}.{Mode}.{Config} -> {Case}.{Mode} fallback chain, so output that
+// is identical across variants is stored once. Baselines are read from the source tree during local runs
+// and from a copy next to the test assembly on CI (see the csproj), and are (re)written to the source tree
+// by the UPDATE_BASELINES workflow.
+
+public enum BaselineConfig
+{
+ Compatible,
+ Default,
+ Latest,
+ Preview,
+}
+
+public static class BaselineConfigExtensions
+{
+ // The config-only configuration flags (no GenerateUnixTypes), shared by BaselineVariant.ConfigOptions and
+ // the host-keyed standalone cases that must not fold in the OS flag.
+ public static PInvokeGeneratorConfigurationOptions ToConfigOptions(this BaselineConfig config) => config switch {
+ BaselineConfig.Compatible => PInvokeGeneratorConfigurationOptions.GenerateCompatibleCode,
+ BaselineConfig.Latest => PInvokeGeneratorConfigurationOptions.GenerateLatestCode,
+ BaselineConfig.Preview => PInvokeGeneratorConfigurationOptions.GeneratePreviewCode,
+ _ => PInvokeGeneratorConfigurationOptions.None,
+ };
+}
+
+public enum BaselineOs
+{
+ Windows,
+ Unix,
+}
+
+public readonly record struct BaselineVariant(PInvokeGeneratorOutputMode Mode, BaselineConfig Config, BaselineOs Os)
+{
+ public string ModeToken => Mode == PInvokeGeneratorOutputMode.Xml ? "Xml" : "CSharp";
+
+ public override string ToString() => $"{ModeToken}{Config}{Os}";
+
+ // Maps a variant onto the same (outputMode, configOptions) the legacy ValidateGenerated{Config}{OS}
+ // wrappers used, so the generated output is identical to the pre-migration harness.
+ public PInvokeGeneratorConfigurationOptions ConfigOptions
+ {
+ get
+ {
+ var options = Config.ToConfigOptions();
+
+ if (Os == BaselineOs.Unix)
+ {
+ options |= PInvokeGeneratorConfigurationOptions.GenerateUnixTypes;
+ }
+
+ return options;
+ }
+ }
+
+ public bool MatchesHost
+ {
+ get
+ {
+ var hostIsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
+ return Os == BaselineOs.Windows ? hostIsWindows : !hostIsWindows;
+ }
+ }
+}
+
+public static class BaselineHarness
+{
+ public static readonly IReadOnlyList AllVariants = BuildAllVariants();
+
+ private static List BuildAllVariants()
+ {
+ var variants = new List(16);
+
+ foreach (var mode in new[] { PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorOutputMode.Xml })
+ {
+ foreach (var config in Enum.GetValues())
+ {
+ foreach (var os in Enum.GetValues())
+ {
+ variants.Add(new BaselineVariant(mode, config, os));
+ }
+ }
+ }
+
+ return variants;
+ }
+
+ // Baselines are resolved from two roots so a test run works both locally and on CI. The source tree
+ // (located via [CallerFilePath]) is where the baselines live and are (re)written by UPDATE_BASELINES,
+ // and is preferred so a fresh update is picked up without a rebuild. CI builds are deterministic, so
+ // [CallerFilePath] is remapped to a non-existent path there; the copy placed next to the test assembly
+ // (wired up in the csproj) is the fallback that resolves on CI, mirroring how ClangUnsavedFile.h is
+ // copied to the output directory.
+ public static string SourceBaselinesRoot([CallerFilePath] string thisFilePath = "")
+ => Path.Combine(Path.GetDirectoryName(thisFilePath)!, "Baselines");
+
+ private static string OutputBaselinesRoot
+ => Path.Combine(AppContext.BaseDirectory, "Baseline", "Baselines");
+
+ private static IEnumerable BaselinesRoots()
+ {
+ yield return SourceBaselinesRoot();
+ yield return OutputBaselinesRoot;
+ }
+
+ public static bool ShouldUpdateBaselines
+ => Environment.GetEnvironmentVariable("UPDATE_BASELINES") is "1" or "true";
+
+ // The Clang target triple pinned for Unix variants. Without an explicit --target, clang parses with the
+ // host's default triple, so target-dependent output (C++ name mangling, type/pointer/long sizes, record
+ // layout) would be baked to whichever host generated the baseline. Pinning a fixed Unix triple makes the
+ // Unix baseline deterministic across every CI host (Linux and macOS produce identical output), so a single
+ // checked-in baseline is valid everywhere. Windows variants are only ever run on a Windows host (see the
+ // MatchesHost gating), so their host default is already the Windows triple and needs no pin.
+ public const string UnixTargetTriple = "x86_64-unknown-linux-gnu";
+
+ // When true, the MatchesHost gating is bypassed so every variant runs on the current host. Used to (re)write
+ // Unix baselines from a Windows box under UPDATE_BASELINES, and to validate them locally via RUN_ALL_VARIANTS,
+ // both of which rely on the pinned Unix triple to reproduce the Unix host's output deterministically.
+ public static bool RunAllVariants
+ => ShouldUpdateBaselines || Environment.GetEnvironmentVariable("RUN_ALL_VARIANTS") is "1" or "true";
+
+ // Appends the pinned Unix target triple for Unix variants, leaving Windows variants exactly as the caller
+ // specified (null flows through to the C++ default inside GenerateBindingsAsync). The base args mirror that
+ // same default so an explicit --target can be appended without otherwise changing the command line.
+ public static string[]? WithUnixTarget(string[]? commandLineArgs, string[] defaultCommandLineArgs, BaselineOs os)
+ {
+ if (os != BaselineOs.Unix)
+ {
+ return commandLineArgs;
+ }
+
+ var baseArgs = commandLineArgs ?? defaultCommandLineArgs;
+ return [.. baseArgs, $"--target={UnixTargetTriple}"];
+ }
+
+ private static string Extension(PInvokeGeneratorOutputMode mode)
+ => mode == PInvokeGeneratorOutputMode.Xml ? "xml" : "cs";
+
+ // Candidate baseline file names, most-specific first, matching the documented fallback chain.
+ private static IEnumerable CandidateNames(string caseName, BaselineVariant variant)
+ {
+ var ext = Extension(variant.Mode);
+ var mode = variant.ModeToken;
+
+ yield return $"{caseName}.{mode}.{variant.Config}.{variant.Os}.{ext}";
+ yield return $"{caseName}.{mode}.{variant.Config}.{ext}";
+ yield return $"{caseName}.{mode}.{ext}";
+ }
+
+ // Resolves the baseline that applies to a variant via the fallback chain; returns null when none exists.
+ public static string? ResolveBaselinePath(string area, string caseName, BaselineVariant variant)
+ {
+ foreach (var root in BaselinesRoots())
+ {
+ foreach (var name in CandidateNames(caseName, variant))
+ {
+ var candidate = Path.Combine(root, area, name);
+
+ if (File.Exists(candidate))
+ {
+ return candidate;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ // The most-specific path, used when writing a fresh baseline before de-duplication collapses it. Writes
+ // always target the source tree so UPDATE_BASELINES updates the checked-in files, not the output copy.
+ public static string MostSpecificPath(string area, string caseName, BaselineVariant variant)
+ {
+ using var e = CandidateNames(caseName, variant).GetEnumerator();
+ _ = e.MoveNext();
+ return Path.Combine(SourceBaselinesRoot(), area, e.Current);
+ }
+
+ // Filesystem-safe case token derived from the test method name plus any per-case discriminator.
+ // The method name is always a valid C# identifier (already filesystem-safe); the discriminator can be
+ // an arbitrary [TestCase] argument (operators like "%"/"|", pointer types like "int *"), so it is
+ // encoded injectively: letters/digits pass through, every other character becomes `_` + its hex code
+ // point. This is collision-free -- distinct discriminators always yield distinct tokens -- which the
+ // naive "replace every non-alphanumeric with `_`" scheme was not (e.g. `%`, `|`, `^`, `*` all collapsed
+ // to the same file, so per-operator baselines overwrote one another).
+ public static string CaseName(string method, string? discriminator = null)
+ {
+ ArgumentNullException.ThrowIfNull(method);
+
+ return discriminator is null ? method : $"{method}_{Encode(discriminator)}";
+ }
+
+ private static string Encode(string discriminator)
+ {
+ var sb = new System.Text.StringBuilder(discriminator.Length);
+
+ foreach (var c in discriminator)
+ {
+ if (char.IsAsciiLetterOrDigit(c))
+ {
+ _ = sb.Append(c);
+ }
+ else if (c <= 0xFF)
+ {
+ _ = sb.Append('_').Append(((int)c).ToString("X2", CultureInfo.InvariantCulture));
+ }
+ else
+ {
+ _ = sb.Append("_u").Append(((int)c).ToString("X4", CultureInfo.InvariantCulture));
+ }
+ }
+
+ return sb.ToString();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineTest.cs
new file mode 100644
index 00000000..20be8e6b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineTest.cs
@@ -0,0 +1,57 @@
+// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
+
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using NUnit.Framework;
+
+namespace ClangSharp.UnitTests.Baseline;
+
+// Base class for migrated, baseline-driven fixtures. A single fixture is parameterized over all 16
+// (Mode, Config, OS) variants via [TestFixtureSource]; each concrete test supplies the C/C++ input and a
+// case name exactly once, and the expected output comes from a checked-in baseline file.
+public abstract class BaselineTest : PInvokeGeneratorTest
+{
+ private readonly BaselineVariant _variant;
+
+ protected BaselineTest(BaselineVariant variant)
+ {
+ _variant = variant;
+ }
+
+ protected abstract string Area { get; }
+
+ // The variant this fixture instance is exercising. Exposed so a migrated case can replicate a legacy no-op
+ // (a folder that stubbed its *Impl to Task.CompletedTask) for the specific variants it was never run under.
+ protected BaselineVariant Variant => _variant;
+
+ // Feeds [TestFixtureSource]; Unix variants are ignored on Windows hosts (and vice versa), matching the
+ // legacy [Platform("win")] / [Platform("unix")] gating exactly.
+ protected static IEnumerable Variants()
+ {
+ foreach (var variant in BaselineHarness.AllVariants)
+ {
+ var data = new TestFixtureData(variant);
+ _ = data.SetArgDisplayNames(variant.ToString());
+
+ if (!variant.MatchesHost && !BaselineHarness.RunAllVariants)
+ {
+ _ = data.Ignore($"{variant.Os} variant only runs on matching hosts");
+ }
+
+ yield return data;
+ }
+ }
+
+ // Mirrors the full ValidateGeneratedCSharpLatestWindowsBindingsAsync surface (minus expectedOutputContents,
+ // which now lives in a checked-in baseline) so any migrated area can express its options exactly. The
+ // Mode/Config come from the fixture variant; additionalConfigOptions OR-in the area's positional flags.
+ protected Task ValidateAsync(string method, string inputContents, string? discriminator = null, PInvokeGeneratorConfigurationOptions additionalConfigOptions = PInvokeGeneratorConfigurationOptions.None, string[]? excludedNames = null, IReadOnlyDictionary? remappedNames = null, IReadOnlyDictionary? withAccessSpecifiers = null, IReadOnlyDictionary>? withAttributes = null, IReadOnlyDictionary? withCallConvs = null, IReadOnlyDictionary? withClasses = null, IReadOnlyDictionary? withLibraryPaths = null, IReadOnlyDictionary? withNamespaces = null, string[]? withSetLastErrors = null, IReadOnlyDictionary? withTransparentStructs = null, IReadOnlyDictionary? withTypes = null, IReadOnlyDictionary>? withUsings = null, IReadOnlyDictionary? withPackings = null, IEnumerable? expectedDiagnostics = null, string libraryPath = DefaultLibraryPath, string[]? commandLineArgs = null, string language = "c++", string languageStandard = DefaultCppStandard, IReadOnlyDictionary? remappedTypeNames = null, IReadOnlyDictionary? remappedFieldNames = null)
+ => ValidateCoreAsync(BaselineHarness.CaseName(method, discriminator), inputContents, additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard, remappedTypeNames, remappedFieldNames);
+
+ private async Task ValidateCoreAsync(string caseName, string inputContents, PInvokeGeneratorConfigurationOptions additionalConfigOptions, string[]? excludedNames, IReadOnlyDictionary? remappedNames, IReadOnlyDictionary? withAccessSpecifiers, IReadOnlyDictionary>? withAttributes, IReadOnlyDictionary? withCallConvs, IReadOnlyDictionary? withClasses, IReadOnlyDictionary? withLibraryPaths, IReadOnlyDictionary? withNamespaces, string[]? withSetLastErrors, IReadOnlyDictionary? withTransparentStructs, IReadOnlyDictionary? withTypes, IReadOnlyDictionary>? withUsings, IReadOnlyDictionary? withPackings, IEnumerable? expectedDiagnostics, string libraryPath, string[]? commandLineArgs, string language, string languageStandard, IReadOnlyDictionary? remappedTypeNames, IReadOnlyDictionary? remappedFieldNames)
+ {
+ var effectiveCommandLineArgs = BaselineHarness.WithUnixTarget(commandLineArgs, DefaultCppClangCommandLineArgs, _variant.Os);
+ var actual = await GenerateBindingsAsync(inputContents, _variant.Mode, _variant.ConfigOptions | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, effectiveCommandLineArgs, language, languageStandard, remappedTypeNames, remappedFieldNames).ConfigureAwait(false);
+ await BaselineAssertions.AssertOrUpdateAsync(Area, caseName, _variant, actual).ConfigureAwait(false);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/AnonymousEnumReferenceExcludeUsingStatics/ReferenceIsQualifiedWithBackingClass.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/AnonymousEnumReferenceExcludeUsingStatics/ReferenceIsQualifiedWithBackingClass.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..8748e8e0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/AnonymousEnumReferenceExcludeUsingStatics/ReferenceIsQualifiedWithBackingClass.CSharp.Latest.Windows.cs
@@ -0,0 +1,12 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = Methods.MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/BooleanBitfield/CompatibleTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/BooleanBitfield/CompatibleTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..2807ee1c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/BooleanBitfield/CompatibleTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,51 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public byte _bitfield1;
+
+ [NativeTypeName("bool : 1")]
+ public bool a
+ {
+ get
+ {
+ return (_bitfield1 & 0x1u) != 0;
+ }
+
+ set
+ {
+ _bitfield1 = (byte)((_bitfield1 & ~0x1u) | ((value ? 1 : 0) & 0x1u));
+ }
+ }
+
+ [NativeTypeName("bool : 1")]
+ public bool b
+ {
+ get
+ {
+ return ((_bitfield1 >> 1) & 0x1u) != 0;
+ }
+
+ set
+ {
+ _bitfield1 = (byte)((_bitfield1 & ~(0x1u << 1)) | (((value ? 1 : 0) & 0x1u) << 1));
+ }
+ }
+
+ public int _bitfield2;
+
+ [NativeTypeName("int : 2")]
+ public int c
+ {
+ get
+ {
+ return (_bitfield2 << 30) >> 30;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x3) | (value & 0x3);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/BooleanBitfield/LatestTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/BooleanBitfield/LatestTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..3b6f7cd7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/BooleanBitfield/LatestTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,51 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public byte _bitfield1;
+
+ [NativeTypeName("bool : 1")]
+ public bool a
+ {
+ readonly get
+ {
+ return (_bitfield1 & 0x1u) != 0;
+ }
+
+ set
+ {
+ _bitfield1 = (byte)((_bitfield1 & ~0x1u) | ((value ? 1 : 0) & 0x1u));
+ }
+ }
+
+ [NativeTypeName("bool : 1")]
+ public bool b
+ {
+ readonly get
+ {
+ return ((_bitfield1 >> 1) & 0x1u) != 0;
+ }
+
+ set
+ {
+ _bitfield1 = (byte)((_bitfield1 & ~(0x1u << 1)) | (((value ? 1 : 0) & 0x1u) << 1));
+ }
+ }
+
+ public int _bitfield2;
+
+ [NativeTypeName("int : 2")]
+ public int c
+ {
+ readonly get
+ {
+ return (_bitfield2 << 30) >> 30;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x3) | (value & 0x3);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BasicTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BasicTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..9360543f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BasicTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,16 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned int")]
+ public enum MyEnum : uint
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+
+ public partial struct MyStruct
+ {
+ [NativeTypeName("enum_t")]
+ public MyEnum _field;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BasicTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BasicTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..95603a8e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BasicTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,15 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+
+ public partial struct MyStruct
+ {
+ [NativeTypeName("enum_t")]
+ public MyEnum _field;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyBackingTypeTestUnix.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyBackingTypeTestUnix.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..4f74534d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyBackingTypeTestUnix.CSharp.Latest.Unix.cs
@@ -0,0 +1,96 @@
+namespace ClangSharp.Test
+{
+ public partial struct IntBitfield
+ {
+ public int _bitfield;
+
+ [NativeTypeName("int : 8")]
+ public int bits
+ {
+ readonly get
+ {
+ return (_bitfield << 24) >> 24;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFF) | (value & 0xFF);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 8")]
+ public uint bits2
+ {
+ readonly get
+ {
+ return (uint)((_bitfield >> 8) & 0xFF);
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFF << 8)) | (int)((value & 0xFFu) << 8);
+ }
+ }
+ }
+
+ public partial struct UIntBitfield
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 8")]
+ public uint bits1
+ {
+ readonly get
+ {
+ return _bitfield & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFu) | (value & 0xFFu);
+ }
+ }
+
+ [NativeTypeName("int : 8")]
+ public int bits2
+ {
+ readonly get
+ {
+ return (int)(_bitfield << 16) >> 24;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 8)) | (uint)((value & 0xFF) << 8);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 8")]
+ public byte bits3
+ {
+ readonly get
+ {
+ return (byte)((_bitfield >> 16) & 0xFFu);
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 16)) | (uint)((value & 0xFFu) << 16);
+ }
+ }
+
+ [NativeTypeName("char : 8")]
+ public sbyte bits4
+ {
+ readonly get
+ {
+ return (sbyte)((sbyte)(_bitfield << 0) >> 24);
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 24)) | (uint)((value & 0xFF) << 24);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertySmallBackingTypeTestUnix.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertySmallBackingTypeTestUnix.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..1575ef13
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertySmallBackingTypeTestUnix.CSharp.Latest.Unix.cs
@@ -0,0 +1,53 @@
+namespace ClangSharp.Test
+{
+ public partial struct Bitfield
+ {
+ public byte _bitfield1;
+
+ [NativeTypeName("unsigned char : 8")]
+ public byte bits1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield1 & 0xFFu);
+ }
+
+ set
+ {
+ _bitfield1 = (byte)((_bitfield1 & ~0xFFu) | (value & 0xFFu));
+ }
+ }
+
+ public sbyte _bitfield2;
+
+ [NativeTypeName("char : 8")]
+ public sbyte bits2
+ {
+ readonly get
+ {
+ return (sbyte)((_bitfield2 << 0) >> 0);
+ }
+
+ set
+ {
+ _bitfield2 = (sbyte)((_bitfield2 & ~0xFF) | (value & 0xFF));
+ }
+ }
+
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 8")]
+ public byte bits3
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0xFFu);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0xFFu) | (value & 0xFFu));
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyTypeCastTestUnix.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyTypeCastTestUnix.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..b901fafe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyTypeCastTestUnix.CSharp.Latest.Unix.cs
@@ -0,0 +1,41 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned int")]
+ public enum Flags : uint
+ {
+ Member = 0x7FFFFFFF,
+ }
+
+ public partial struct Bitfield
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 8")]
+ public uint bits
+ {
+ readonly get
+ {
+ return _bitfield & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFu) | (value & 0xFFu);
+ }
+ }
+
+ [NativeTypeName("Flags : 8")]
+ public Flags flags
+ {
+ readonly get
+ {
+ return (Flags)((_bitfield >> 8) & 0xFFu);
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 8)) | (((uint)(value) & 0xFFu) << 8);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyTypeCastTestWindows.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyTypeCastTestWindows.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..1c543546
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumPropertyTypeCastTestWindows.CSharp.Latest.Windows.cs
@@ -0,0 +1,40 @@
+namespace ClangSharp.Test
+{
+ public enum Flags
+ {
+ Member = 0x7FFFFFFF,
+ }
+
+ public partial struct Bitfield
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 8")]
+ public uint bits
+ {
+ readonly get
+ {
+ return _bitfield & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFu) | (value & 0xFFu);
+ }
+ }
+
+ [NativeTypeName("Flags : 8")]
+ public Flags flags
+ {
+ readonly get
+ {
+ return (Flags)((_bitfield << 16) >> 24);
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 8)) | (((uint)(value) & 0xFF) << 8);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCast.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCast.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..72e67926
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCast.CSharp.Latest.Unix.cs
@@ -0,0 +1,41 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned int")]
+ public enum FlagBits : uint
+ {
+ Member = 0x7FFFFFFF,
+ }
+
+ public partial struct Bitfield
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 8")]
+ public uint bits
+ {
+ readonly get
+ {
+ return _bitfield & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFu) | (value & 0xFFu);
+ }
+ }
+
+ [NativeTypeName("Flags : 8")]
+ public uint flags
+ {
+ readonly get
+ {
+ return (_bitfield >> 8) & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 8)) | ((value & 0xFFu) << 8);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCastWithRemappingTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCastWithRemappingTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..8c01a697
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCastWithRemappingTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,41 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned int")]
+ public enum FlagBits : uint
+ {
+ Member = 0x7FFFFFFF,
+ }
+
+ public partial struct Bitfield
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 8")]
+ public uint bits
+ {
+ readonly get
+ {
+ return _bitfield & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFu) | (value & 0xFFu);
+ }
+ }
+
+ [NativeTypeName("Flags : 8")]
+ public FlagBits flags
+ {
+ readonly get
+ {
+ return (FlagBits)((_bitfield >> 8) & 0xFFu);
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 8)) | (((uint)(value) & 0xFFu) << 8);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCastWithSelfRemappingTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCastWithSelfRemappingTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..2c169315
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldEnumTypeDefPropertyTypeCastWithSelfRemappingTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,35 @@
+namespace ClangSharp.Test
+{
+ public partial struct Bitfield
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 8")]
+ public uint bits
+ {
+ readonly get
+ {
+ return _bitfield & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFu) | (value & 0xFFu);
+ }
+ }
+
+ [NativeTypeName("Flags : 8")]
+ public Flags flags
+ {
+ readonly get
+ {
+ return (Flags)((_bitfield >> 8) & 0xFFu);
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xFFu << 8)) | (((uint)(value) & 0xFFu) << 8);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldTypeDefTypeCastTestUnix.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldTypeDefTypeCastTestUnix.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..c7d8a8b3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/BitfieldTypeDefTypeCastTestUnix.CSharp.Latest.Unix.cs
@@ -0,0 +1,21 @@
+namespace ClangSharp.Test
+{
+ public partial struct Bitfield
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("Number : 8")]
+ public uint bits
+ {
+ readonly get
+ {
+ return _bitfield & 0xFFu;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFu) | (value & 0xFFu);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesRegressionTestUnix.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesRegressionTestUnix.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..e1295a25
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesRegressionTestUnix.CSharp.Latest.Unix.cs
@@ -0,0 +1,23 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [return: NativeTypeName("_Bool")]
+ public static bool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret)
+ {
+ if (b > unchecked(18446744073709551615U) - a)
+ {
+ return (0) != 0;
+ }
+
+ *ret = a + b;
+ return (1) != 0;
+ }
+
+ [NativeTypeName("#define true 1")]
+ public const int @true = 1;
+
+ [NativeTypeName("#define false 0")]
+ public const int @false = 0;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesTestUnix.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesTestUnix.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..caaadc68
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesTestUnix.CSharp.Latest.Unix.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [NativeTypeName("#define SIZE_MAX (18446744073709551615UL)")]
+ public static readonly nuint SIZE_MAX = unchecked((nuint)(18446744073709551615U));
+
+ [NativeTypeName("#define CL_IMPORT_MEMORY_WHOLE_ALLOCATION_ARM SIZE_MAX")]
+ public static readonly nuint CL_IMPORT_MEMORY_WHOLE_ALLOCATION_ARM = unchecked((nuint)(18446744073709551615U));
+
+ [NativeTypeName("#define LONG_MAX __LONG_MAX__")]
+ public static readonly nint LONG_MAX = unchecked((nint)(9223372036854775807));
+
+ [NativeTypeName("#define ULONG_MAX (__LONG_MAX__ *2UL+1UL)")]
+ public static readonly nuint ULONG_MAX = unchecked((nuint)(9223372036854775807 * 2U + 1U));
+
+ [NativeTypeName("#define CONST_IN_RANGE_S1 ((long)2147483647)")]
+ public const nint CONST_IN_RANGE_S1 = ((nint)(2147483647));
+
+ [NativeTypeName("#define CONST_IN_RANGE_U1 ((unsigned long)4294967295)")]
+ public const nuint CONST_IN_RANGE_U1 = ((nuint)(4294967295));
+
+ [NativeTypeName("#define READONLY_OUT_OF_RANGE_S1 ((long)4294967295)")]
+ public static readonly nint READONLY_OUT_OF_RANGE_S1 = unchecked((nint)(4294967295));
+
+ [NativeTypeName("#define READONLY_OUT_OF_RANGE_S2 ((long)4294967296)")]
+ public static readonly nint READONLY_OUT_OF_RANGE_S2 = unchecked((nint)(4294967296));
+
+ [NativeTypeName("#define READONLY_OUT_OF_RANGE_U1 ((unsigned long)4294967296)")]
+ public static readonly nuint READONLY_OUT_OF_RANGE_U1 = unchecked((nuint)(4294967296));
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesTestWindows.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesTestWindows.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..f1db8cc3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/CLongDefinesTestWindows.CSharp.Latest.Windows.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [NativeTypeName("#define SIZE_MAX 0xffffffffffffffffui64")]
+ public const ulong SIZE_MAX = 0xffffffffffffffffUL;
+
+ [NativeTypeName("#define CL_IMPORT_MEMORY_WHOLE_ALLOCATION_ARM SIZE_MAX")]
+ public const ulong CL_IMPORT_MEMORY_WHOLE_ALLOCATION_ARM = 0xffffffffffffffffUL;
+
+ [NativeTypeName("#define LONG_MAX 2147483647L")]
+ public const int LONG_MAX = 2147483647;
+
+ [NativeTypeName("#define ULONG_MAX 0xffffffffUL")]
+ public const uint ULONG_MAX = 0xffffffffU;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/EnumTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/EnumTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..22045657
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/EnumTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,19 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("__AnonymousEnum_ClangUnsavedFile_L8_C5")]
+ public uint field;
+
+ public const uint VALUEA = 0;
+ public const uint VALUEB = 1;
+ public const uint VALUEC = 2;
+ }
+
+ public static partial class Methods
+ {
+ public const uint VALUE1 = 0;
+ public const uint VALUE2 = 1;
+ public const uint VALUE3 = 2;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/EnumTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/EnumTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..a9bbb306
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/EnumTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,19 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("__AnonymousEnum_ClangUnsavedFile_L8_C5")]
+ public int field;
+
+ public const int VALUEA = 0;
+ public const int VALUEB = 1;
+ public const int VALUEC = 2;
+ }
+
+ public static partial class Methods
+ {
+ public const int VALUE1 = 0;
+ public const int VALUE2 = 1;
+ public const int VALUE3 = 2;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/MacroTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/MacroTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..d1100643
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/MacroTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [NativeTypeName("#define MyMacro1 5")]
+ public const int MyMacro1 = 5;
+
+ [NativeTypeName("#define MyMacro2 MyMacro1")]
+ public const int MyMacro2 = 5;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/StructTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/StructTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..a08172e5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/StructTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,45 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct _MyStruct
+ {
+ public int _field;
+ }
+
+ public unsafe partial struct _MyOtherStruct
+ {
+ [NativeTypeName("MyStruct")]
+ public _MyStruct _field1;
+
+ [NativeTypeName("MyStruct *")]
+ public _MyStruct* _field2;
+ }
+
+ public partial struct _MyStructWithAnonymousStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C5")]
+ public __anonymousStructField1_e__Struct _anonymousStructField1;
+
+ public partial struct __anonymousStructField1_e__Struct
+ {
+ public int _field;
+ }
+ }
+
+ public partial struct _MyStructWithAnonymousUnion
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L21_C5")]
+ public _union1_e__Union union1;
+
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct _union1_e__Union
+ {
+ [FieldOffset(0)]
+ public int _field1;
+
+ [FieldOffset(0)]
+ public int* _field2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnionTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnionTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..e7226974
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnionTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,23 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _MyUnion
+ {
+ [FieldOffset(0)]
+ public int _field;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct _MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion")]
+ public _MyUnion _field1;
+
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion *")]
+ public _MyUnion* _field2;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnsignedIntBitshiftTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnsignedIntBitshiftTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..b2732539
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnsignedIntBitshiftTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,89 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [NativeTypeName("const int")]
+ public const int Signed = 1;
+
+ [NativeTypeName("const long")]
+ public const int SignedLong = 1;
+
+ [NativeTypeName("const unsigned int")]
+ public const uint Unsigned = 1;
+
+ [NativeTypeName("const int")]
+ public const int ShiftSigned = 1 << Signed;
+
+ [NativeTypeName("const int")]
+ public const int ShiftSignedLong = 1 << SignedLong;
+
+ [NativeTypeName("const int")]
+ public const int ShiftUnsigned = 1 << (int)(Unsigned);
+
+ [NativeTypeName("const int")]
+ public const int Char = 1 << (sbyte)('a');
+
+ [NativeTypeName("const int")]
+ public const int Byte = 1 << (sbyte)(1);
+
+ [NativeTypeName("const int")]
+ public const int UByte = unchecked(1 << (byte)(1));
+
+ [NativeTypeName("const int")]
+ public const int CInt = 1 << 1;
+
+ [NativeTypeName("const int")]
+ public const int CUint = 1 << 1;
+
+ [NativeTypeName("const int")]
+ public const int Negative = 1 << -1;
+
+ [NativeTypeName("const int")]
+ public const int OutOfRangePos = unchecked(1 << (int)(10000000000));
+
+ [NativeTypeName("const int")]
+ public const int OutOfRangeNeg = unchecked(1 << (int)(-10000000000));
+
+ [NativeTypeName("const int")]
+ public const int IntMax = 1 << 2147483647;
+
+ [NativeTypeName("const int")]
+ public const int IntMin = unchecked(1 << -2147483648);
+
+ [NativeTypeName("const int")]
+ public const int LongMax = unchecked(1 << (int)(9223372036854775807));
+
+ [NativeTypeName("const int")]
+ public const int LongMin = unchecked(1 << (int)(-9223372036854775808));
+
+ [NativeTypeName("const int")]
+ public const int ULongMax = 1 << -1;
+
+ [NativeTypeName("const int")]
+ public const int Hexadecimal = 1 << 1;
+
+ [NativeTypeName("#define Left 1 << 1U")]
+ public const int Left = 1 << 1;
+
+ [NativeTypeName("#define Right 1 >> 1U")]
+ public const int Right = 1 >> 1;
+
+ [NativeTypeName("#define Int 1 << 1")]
+ public const int Int = 1 << 1;
+
+ [NativeTypeName("#define Long 1 << 1L")]
+ public const int Long = 1 << 1;
+
+ [NativeTypeName("#define LongLong 1 << 1LL")]
+ public const int LongLong = 1 << 1;
+
+ [NativeTypeName("#define ULong 1 << 1UL")]
+ public const int ULong = 1 << 1;
+
+ [NativeTypeName("#define ULongLong 1 << 1ULL")]
+ public const int ULongLong = 1 << 1;
+
+ [NativeTypeName("#define Complex ((((unsigned int)(0)) << 29U) | (((unsigned int)(1)) << 22U) | (((unsigned int)(0)) << 12U) | ((unsigned int)(0)))")]
+ public const uint Complex = ((((uint)(0)) << 29) | (((uint)(1)) << 22) | (((uint)(0)) << 12) | ((uint)(0)));
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnsignedIntBitshiftTestUnix.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnsignedIntBitshiftTestUnix.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..21229d9b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/UnsignedIntBitshiftTestUnix.CSharp.Latest.Unix.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [NativeTypeName("const long")]
+ public const nint SignedLong = 1;
+
+ [NativeTypeName("const int")]
+ public const int ShiftSignedLong = 1 << (int)(SignedLong);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/VoidPointerArithmeticTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/VoidPointerArithmeticTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..26a72578
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/C/VoidPointerArithmeticTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static void* MyFunction(void* buf, [NativeTypeName("unsigned long long")] ulong size)
+ {
+ return (byte*)buf + size;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorTest.CSharp.cs
new file mode 100644
index 00000000..2f18e222
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorTest.CSharp.cs
@@ -0,0 +1,12 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int _value;
+
+ public MyStruct(int value)
+ {
+ _value = value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorTest.Xml.xml
new file mode 100644
index 00000000..b5995343
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorTest.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+
+ void
+
+ int
+
+ _value = value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorWithInitializeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorWithInitializeTest.CSharp.cs
new file mode 100644
index 00000000..f4ca52c5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorWithInitializeTest.CSharp.cs
@@ -0,0 +1,28 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int _x;
+
+ public int _y;
+
+ public int _z;
+
+ public MyStruct(int x)
+ {
+ _x = x;
+ }
+
+ public MyStruct(int x, int y)
+ {
+ _x = x;
+ _y = y;
+ }
+
+ public MyStruct(int x, int y, int z)
+ {
+ _x = x;
+ _y = y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorWithInitializeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorWithInitializeTest.Xml.xml
new file mode 100644
index 00000000..8222ac99
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConstructorWithInitializeTest.Xml.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+ void
+
+ int
+
+
+ x
+
+
+
+
+ void
+
+ int
+
+
+ int
+
+
+ x
+
+
+ y
+
+
+
+
+ void
+
+ int
+
+
+ int
+
+
+ int
+
+
+ x
+
+
+ y
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConversionTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConversionTest.CSharp.cs
new file mode 100644
index 00000000..4ccf2900
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConversionTest.CSharp.cs
@@ -0,0 +1,33 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public int value;
+
+ public int* pointer;
+
+ public int** pointer2;
+
+ public int*** pointer3;
+
+ public int ToInt32()
+ {
+ return value;
+ }
+
+ public int* ToInt32Pointer()
+ {
+ return pointer;
+ }
+
+ public int** ToInt32PointerPointer()
+ {
+ return pointer2;
+ }
+
+ public int*** ToInt32PointerPointerPointer()
+ {
+ return pointer3;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConversionTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConversionTest.Xml.xml
new file mode 100644
index 00000000..6d373d33
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ConversionTest.Xml.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+ int
+
+
+ int*
+
+
+ int**
+
+
+ int***
+
+
+ int
+ return value;
+
+
+ int*
+ return pointer;
+
+
+ int**
+ return pointer2;
+
+
+ int***
+ return pointer3;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..c44dcce0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN10MyTemplateIiE6DoWorkEPi", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..11635723
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..c44dcce0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Default.Unix.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN10MyTemplateIiE6DoWorkEPi", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..11635723
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Default.Windows.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..c44dcce0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN10MyTemplateIiE6DoWorkEPi", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..11635723
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..c44dcce0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN10MyTemplateIiE6DoWorkEPi", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..11635723
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [NativeTypeName("struct MyStruct : MyTemplate")]
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z", ExactSpelling = true)]
+ public static extern int* DoWork(MyStruct* pThis, int* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..b66bee16
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..412e9c2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..b66bee16
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Default.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..412e9c2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Default.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..b66bee16
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Latest.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..412e9c2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Latest.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..b66bee16
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Preview.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..412e9c2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DefaultParameterInheritedFromTemplateTest.Xml.Preview.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int*
+
+ MyStruct*
+
+
+ int*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DestructorTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DestructorTest.CSharp.cs
new file mode 100644
index 00000000..c7b76763
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DestructorTest.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public void Dispose()
+ {
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DestructorTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DestructorTest.Xml.xml
new file mode 100644
index 00000000..9223ae48
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/DestructorTest.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ void
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..d1204429
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod(MyStruct* pThis);
+
+ public int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..d1204429
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Default.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod(MyStruct* pThis);
+
+ public int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..d1204429
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod(MyStruct* pThis);
+
+ public int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..d1204429
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod(MyStruct* pThis);
+
+ public int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.cs
new file mode 100644
index 00000000..da8c52c6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.ThisCall, EntryPoint = "?MyVoidMethod@MyStruct@@QEAAXXZ", ExactSpelling = true)]
+ public static extern void MyVoidMethod(MyStruct* pThis);
+
+ public int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..c68a9c76
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ void
+
+ MyStruct*
+
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..c68a9c76
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Default.Unix.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ void
+
+ MyStruct*
+
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..c68a9c76
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Latest.Unix.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ void
+
+ MyStruct*
+
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..c68a9c76
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.Preview.Unix.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ void
+
+ MyStruct*
+
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.xml
new file mode 100644
index 00000000..f874b78c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/InstanceTest.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ void
+
+ MyStruct*
+
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MacrosExpansionTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MacrosExpansionTest.CSharp.cs
new file mode 100644
index 00000000..23d2e43e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MacrosExpansionTest.CSharp.cs
@@ -0,0 +1,19 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct context_t
+ {
+ [NativeTypeName("unsigned char *")]
+ public byte* buf;
+
+ public int size;
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static int buf_close(void* pContext)
+ {
+ ((context_t*)(pContext))->buf = null;
+ return 0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MacrosExpansionTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MacrosExpansionTest.Xml.xml
new file mode 100644
index 00000000..9bc0af1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MacrosExpansionTest.Xml.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ byte*
+
+
+ int
+
+
+
+
+ int
+
+ void*
+
+ ((context_t*)(pContext))->buf = null;
+ return 0;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberCallTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberCallTest.CSharp.cs
new file mode 100644
index 00000000..f8d3c170
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberCallTest.CSharp.cs
@@ -0,0 +1,35 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+
+ public int MyFunction1()
+ {
+ return value;
+ }
+
+ public int MyFunction2()
+ {
+ return MyFunction1();
+ }
+
+ public int MyFunction3()
+ {
+ return this.MyFunction1();
+ }
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static int MyFunctionA(MyStruct x)
+ {
+ return x.MyFunction1();
+ }
+
+ public static int MyFunctionB(MyStruct* x)
+ {
+ return x->MyFunction2();
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberCallTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberCallTest.Xml.xml
new file mode 100644
index 00000000..84cbc6a0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberCallTest.Xml.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ int
+
+
+ int
+ return value;
+
+
+ int
+ return MyFunction1();
+
+
+ int
+ return this.MyFunction1();
+
+
+
+
+ int
+
+ MyStruct
+
+ return x.MyFunction1();
+
+
+ int
+
+ MyStruct*
+
+ return x->MyFunction2();
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberTest.CSharp.cs
new file mode 100644
index 00000000..74115c12
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberTest.CSharp.cs
@@ -0,0 +1,12 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+
+ public int MyFunction()
+ {
+ return value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberTest.Xml.xml
new file mode 100644
index 00000000..c0c48e91
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/MemberTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+
+ int
+ return value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordTest.CSharp.cs
new file mode 100644
index 00000000..790dfed4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordTest.CSharp.cs
@@ -0,0 +1,75 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int Equals()
+ {
+ return 0;
+ }
+
+ public int Equals(int obj)
+ {
+ return 0;
+ }
+
+ public int Dispose()
+ {
+ return 0;
+ }
+
+ public int Dispose(int obj)
+ {
+ return 0;
+ }
+
+ public new int GetHashCode()
+ {
+ return 0;
+ }
+
+ public int GetHashCode(int obj)
+ {
+ return 0;
+ }
+
+ public new int GetType()
+ {
+ return 0;
+ }
+
+ public int GetType(int obj)
+ {
+ return 0;
+ }
+
+ public new int MemberwiseClone()
+ {
+ return 0;
+ }
+
+ public int MemberwiseClone(int obj)
+ {
+ return 0;
+ }
+
+ public int ReferenceEquals()
+ {
+ return 0;
+ }
+
+ public int ReferenceEquals(int obj)
+ {
+ return 0;
+ }
+
+ public new int ToString()
+ {
+ return 0;
+ }
+
+ public int ToString(int obj)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordTest.Xml.xml
new file mode 100644
index 00000000..bdfd1a3b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordTest.Xml.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+ int
+ return 0;
+
+
+ int
+
+ int
+
+ return 0;
+
+
+ int
+ return 0;
+
+
+ int
+
+ int
+
+ return 0;
+
+
+ int
+ return 0;
+
+
+ int
+
+ int
+
+ return 0;
+
+
+ int
+ return 0;
+
+
+ int
+
+ int
+
+ return 0;
+
+
+ int
+ return 0;
+
+
+ int
+
+ int
+
+ return 0;
+
+
+ int
+ return 0;
+
+
+ int
+
+ int
+
+ return 0;
+
+
+ int
+ return 0;
+
+
+ int
+
+ int
+
+ return 0;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..c6947a8d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType(MyStruct* pThis, int obj);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType1(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType2(MyStruct* pThis, int objA, int objB);
+
+ public int GetType(int obj)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>((IntPtr)(lpVtbl[0]))(pThis, obj);
+ }
+ }
+
+ public new int GetType()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>((IntPtr)(lpVtbl[2]))(pThis, objA, objB);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..6333da6b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType(MyStruct* pThis, int objA, int objB);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType1(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType2(MyStruct* pThis, int obj);
+
+ public int GetType(int objA, int objB)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>((IntPtr)(lpVtbl[0]))(pThis, objA, objB);
+ }
+ }
+
+ public new int GetType()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+ }
+
+ public int GetType(int obj)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>((IntPtr)(lpVtbl[2]))(pThis, obj);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..43e838c8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Default.Unix.cs
@@ -0,0 +1,24 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..c6a33d7d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Default.Windows.cs
@@ -0,0 +1,24 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..43e838c8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,24 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..c6a33d7d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,24 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..43e838c8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,24 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..c6a33d7d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,24 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..7a0438cd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>((IntPtr)(lpVtbl[0]))(pThis, obj);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>((IntPtr)(lpVtbl[2]))(pThis, objA, objB);
+ }
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..f5e1b276
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>((IntPtr)(lpVtbl[0]))(pThis, objA, objB);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+
+
+
+ int
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>((IntPtr)(lpVtbl[2]))(pThis, obj);
+ }
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..00072249
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Default.Unix.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..b7ebefa1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Default.Windows.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..00072249
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Latest.Unix.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..b7ebefa1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Latest.Windows.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..00072249
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Preview.Unix.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..b7ebefa1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualTest.Xml.Preview.Windows.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ void**
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..ad6830b1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType(MyStruct* pThis, int obj);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType1(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType2(MyStruct* pThis, int objA, int objB);
+
+ public int GetType(int obj)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, obj);
+ }
+ }
+
+ public new int GetType()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, objA, objB);
+ }
+ }
+
+ public interface Interface
+ {
+ int GetType(int obj);
+
+ int GetType();
+
+ int GetType(int objA, int objB);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int)")]
+ public new IntPtr GetType;
+
+ [NativeTypeName("int ()")]
+ public IntPtr GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public IntPtr GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..ba92ce4b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType(MyStruct* pThis, int objA, int objB);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType1(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType2(MyStruct* pThis, int obj);
+
+ public int GetType(int objA, int objB)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, objA, objB);
+ }
+ }
+
+ public new int GetType()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+ }
+
+ public int GetType(int obj)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, obj);
+ }
+ }
+
+ public interface Interface
+ {
+ int GetType(int objA, int objB);
+
+ int GetType();
+
+ int GetType(int obj);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int, int)")]
+ public new IntPtr GetType;
+
+ [NativeTypeName("int ()")]
+ public IntPtr GetType1;
+
+ [NativeTypeName("int (int)")]
+ public IntPtr GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..fda26b8b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Default.Unix.cs
@@ -0,0 +1,46 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public interface Interface
+ {
+ int GetType(int obj);
+
+ int GetType();
+
+ int GetType(int objA, int objB);
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("int (int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..0e94284a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Default.Windows.cs
@@ -0,0 +1,46 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public interface Interface
+ {
+ int GetType(int objA, int objB);
+
+ int GetType();
+
+ int GetType(int obj);
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("int (int, int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..fda26b8b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,46 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public interface Interface
+ {
+ int GetType(int obj);
+
+ int GetType();
+
+ int GetType(int objA, int objB);
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("int (int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..0e94284a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,46 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public interface Interface
+ {
+ int GetType(int objA, int objB);
+
+ int GetType();
+
+ int GetType(int obj);
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("int (int, int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..fda26b8b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,46 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public interface Interface
+ {
+ int GetType(int obj);
+
+ int GetType();
+
+ int GetType(int objA, int objB);
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("int (int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..0e94284a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,46 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct : MyStruct.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public interface Interface
+ {
+ int GetType(int objA, int objB);
+
+ int GetType();
+
+ int GetType(int obj);
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("int (int, int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..31299001
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, obj);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, objA, objB);
+ }
+
+
+
+
+ int
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..5525d021
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, objA, objB);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+
+
+
+ int
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, obj);
+ }
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..b9518f46
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Default.Unix.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Vtbl<MyStruct>*
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+ int
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..273c686f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Default.Windows.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Vtbl<MyStruct>*
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..b9518f46
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Latest.Unix.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Vtbl<MyStruct>*
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+ int
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..273c686f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Latest.Windows.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Vtbl<MyStruct>*
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..b9518f46
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Preview.Unix.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Vtbl<MyStruct>*
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+ int
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..273c686f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Xml.Preview.Windows.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Vtbl<MyStruct>*
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+
+ int
+
+
+ int
+
+ int
+
+
+
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int>
+
+
+ delegate* unmanaged[Thiscall]<TSelf*, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..ef063190
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType(MyStruct* pThis, int obj);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType1(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType2(MyStruct* pThis, int objA, int objB);
+
+ public int GetType(int obj)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, obj);
+ }
+ }
+
+ public new int GetType()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, objA, objB);
+ }
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int)")]
+ public new IntPtr GetType;
+
+ [NativeTypeName("int ()")]
+ public IntPtr GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public IntPtr GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..b8150a37
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType(MyStruct* pThis, int objA, int objB);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType1(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _GetType2(MyStruct* pThis, int obj);
+
+ public int GetType(int objA, int objB)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, objA, objB);
+ }
+ }
+
+ public new int GetType()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+ }
+
+ public int GetType(int obj)
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, obj);
+ }
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int, int)")]
+ public new IntPtr GetType;
+
+ [NativeTypeName("int ()")]
+ public IntPtr GetType1;
+
+ [NativeTypeName("int (int)")]
+ public IntPtr GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..6f5663c8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Default.Unix.cs
@@ -0,0 +1,36 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..15da4204
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Default.Windows.cs
@@ -0,0 +1,36 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int, int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..6f5663c8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,36 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..15da4204
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,36 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int, int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..6f5663c8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,36 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int, int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..15da4204
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,36 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public Vtbl* lpVtbl;
+
+ public int GetType(int objA, int objB)
+ {
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+ }
+
+ public new int GetType()
+ {
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int GetType(int obj)
+ {
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("int (int, int)")]
+ public new delegate* unmanaged[Thiscall] GetType;
+
+ [NativeTypeName("int ()")]
+ public delegate* unmanaged[Thiscall] GetType1;
+
+ [NativeTypeName("int (int)")]
+ public delegate* unmanaged[Thiscall] GetType2;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..399f4fe7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, obj);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, objA, objB);
+ }
+
+
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..71b122fb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType>(lpVtbl->GetType)(pThis, objA, objB);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType1>(lpVtbl->GetType1)(pThis);
+ }
+
+
+
+ int
+
+ int
+
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_GetType2>(lpVtbl->GetType2)(pThis, obj);
+ }
+
+
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+ IntPtr
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..bcdcff1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Default.Unix.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..3ff74f5e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Default.Windows.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..bcdcff1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Latest.Unix.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..3ff74f5e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Latest.Windows.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..bcdcff1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Preview.Unix.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..3ff74f5e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/NewKeywordVirtualWithExplicitVtblTest.Xml.Preview.Windows.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ Vtbl*
+
+
+ int
+
+ int
+
+
+ int
+
+
+ return lpVtbl->GetType((MyStruct*)Unsafe.AsPointer(ref this), objA, objB);
+
+
+
+ int
+
+ return lpVtbl->GetType1((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ int
+
+
+ return lpVtbl->GetType2((MyStruct*)Unsafe.AsPointer(ref this), obj);
+
+
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int>
+
+
+ delegate* unmanaged[Thiscall]<MyStruct*, int, int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorCallTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorCallTest.CSharp.cs
new file mode 100644
index 00000000..f2da1d51
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorCallTest.CSharp.cs
@@ -0,0 +1,35 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+
+ public MyStruct(int value)
+ {
+ this.value = value;
+ }
+
+ public MyStruct Add(MyStruct rhs)
+ {
+ return new MyStruct(value + rhs.value);
+ }
+ }
+
+ public static partial class Methods
+ {
+ public static MyStruct MyFunction1(MyStruct lhs, MyStruct rhs)
+ {
+ return lhs.Add(rhs);
+ }
+
+ public static MyStruct Subtract(MyStruct lhs, MyStruct rhs)
+ {
+ return new MyStruct(lhs.value - rhs.value);
+ }
+
+ public static MyStruct MyFunction2(MyStruct lhs, MyStruct rhs)
+ {
+ return Subtract(lhs, rhs);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorCallTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorCallTest.Xml.xml
new file mode 100644
index 00000000..f41d5272
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorCallTest.Xml.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ int
+
+
+ void
+
+ int
+
+
+ value
+
+
+
+
+ MyStruct
+
+ MyStruct
+
+ return new MyStruct(value + rhs.value);
+
+
+
+
+ MyStruct
+
+ MyStruct
+
+
+ MyStruct
+
+ return lhs.Add(rhs);
+
+
+ MyStruct
+
+ MyStruct
+
+
+ MyStruct
+
+ return new MyStruct(lhs.value - rhs.value);
+
+
+ MyStruct
+
+ MyStruct
+
+
+ MyStruct
+
+ return Subtract(lhs, rhs);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorTest.CSharp.cs
new file mode 100644
index 00000000..dcdc3cbd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorTest.CSharp.cs
@@ -0,0 +1,25 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+
+ public MyStruct(int value)
+ {
+ this.value = value;
+ }
+
+ public MyStruct Add(MyStruct rhs)
+ {
+ return new MyStruct(value + rhs.value);
+ }
+ }
+
+ public static partial class Methods
+ {
+ public static MyStruct Subtract(MyStruct lhs, MyStruct rhs)
+ {
+ return new MyStruct(lhs.value - rhs.value);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorTest.Xml.xml
new file mode 100644
index 00000000..1f20f49b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/OperatorTest.Xml.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ int
+
+
+ void
+
+ int
+
+
+ value
+
+
+
+
+ MyStruct
+
+ MyStruct
+
+ return new MyStruct(value + rhs.value);
+
+
+
+
+ MyStruct
+
+ MyStruct
+
+
+ MyStruct
+
+ return new MyStruct(lhs.value - rhs.value);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..153b9444
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod();
+
+ public static int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public static void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..153b9444
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Default.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod();
+
+ public static int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public static void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..153b9444
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod();
+
+ public static int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public static void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..153b9444
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN8MyStruct12MyVoidMethodEv", ExactSpelling = true)]
+ public static extern void MyVoidMethod();
+
+ public static int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public static void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.cs
new file mode 100644
index 00000000..81ad1ea6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?MyVoidMethod@MyStruct@@SAXXZ", ExactSpelling = true)]
+ public static extern void MyVoidMethod();
+
+ public static int MyInt32Method()
+ {
+ return 0;
+ }
+
+ public static void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..5bd1174c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ void
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..5bd1174c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Default.Unix.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ void
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..5bd1174c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Latest.Unix.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ void
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..5bd1174c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.Preview.Unix.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ void
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.xml
new file mode 100644
index 00000000..699c4410
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/StaticTest.Xml.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ void
+
+
+ int
+ return 0;
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ThisTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ThisTest.CSharp.cs
new file mode 100644
index 00000000..4fc497af
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ThisTest.CSharp.cs
@@ -0,0 +1,12 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+
+ public int MyFunction()
+ {
+ return this.value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ThisTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ThisTest.Xml.xml
new file mode 100644
index 00000000..6cf6eb53
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/ThisTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+
+ int
+ return this.value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/UnsafeDoesNotImpactDllImportTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/UnsafeDoesNotImpactDllImportTest.CSharp.cs
new file mode 100644
index 00000000..109086f5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/UnsafeDoesNotImpactDllImportTest.CSharp.cs
@@ -0,0 +1,18 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void* MyVoidStarMethod()
+ {
+ return null;
+ }
+ }
+
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/UnsafeDoesNotImpactDllImportTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/UnsafeDoesNotImpactDllImportTest.Xml.xml
new file mode 100644
index 00000000..339db33f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/UnsafeDoesNotImpactDllImportTest.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void*
+ return null;
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..bbcc5a58
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Compatible.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate void _MyVoidMethod(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ [return: NativeTypeName("signed char")]
+ public delegate sbyte _MyInt8Method(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _MyInt32Method(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate void* _MyVoidStarMethod(MyStruct* pThis);
+
+ public void MyVoidMethod()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyVoidMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+ }
+
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt8Method>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+ }
+
+ public int MyInt32Method()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt32Method>((IntPtr)(lpVtbl[2]))(pThis);
+ }
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyVoidStarMethod>((IntPtr)(lpVtbl[3]))(pThis);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Default.cs
new file mode 100644
index 00000000..02a3d2ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Default.cs
@@ -0,0 +1,30 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public void MyVoidMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int MyInt32Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Latest.cs
new file mode 100644
index 00000000..02a3d2ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Latest.cs
@@ -0,0 +1,30 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public void MyVoidMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int MyInt32Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Preview.cs
new file mode 100644
index 00000000..02a3d2ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.CSharp.Preview.cs
@@ -0,0 +1,30 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ public void MyVoidMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public int MyInt32Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ public void* MyVoidStarMethod()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Compatible.xml
new file mode 100644
index 00000000..27dcea21
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Compatible.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ MyStruct*
+
+
+
+ sbyte
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ void*
+
+ MyStruct*
+
+
+
+ void
+
+ fixed (MyStruct* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyVoidMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+
+
+
+ sbyte
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt8Method>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt32Method>((IntPtr)(lpVtbl[2]))(pThis);
+ }
+
+
+
+ void*
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyVoidStarMethod>((IntPtr)(lpVtbl[3]))(pThis);
+ }
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Default.xml
new file mode 100644
index 00000000..1c89828b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Default.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStruct*, void>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ sbyte
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, sbyte>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ void*
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, void*>)(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Latest.xml
new file mode 100644
index 00000000..1c89828b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Latest.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStruct*, void>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ sbyte
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, sbyte>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ void*
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, void*>)(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Preview.xml
new file mode 100644
index 00000000..1c89828b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualTest.Xml.Preview.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStruct*, void>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ sbyte
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, sbyte>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ void*
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, void*>)(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..8de7b2a2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Compatible.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate void _MyVoidMethod(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ [return: NativeTypeName("signed char")]
+ public delegate sbyte _MyInt8Method(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate int _MyInt32Method(MyStruct* pThis);
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate void* _MyVoidStarMethod(MyStruct* pThis);
+
+ [VtblIndex(0)]
+ public void MyVoidMethod()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyVoidMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+ }
+
+ [VtblIndex(1)]
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt8Method>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+ }
+
+ [VtblIndex(2)]
+ public int MyInt32Method()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt32Method>((IntPtr)(lpVtbl[2]))(pThis);
+ }
+ }
+
+ [VtblIndex(3)]
+ public void* MyVoidStarMethod()
+ {
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyVoidStarMethod>((IntPtr)(lpVtbl[3]))(pThis);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Default.cs
new file mode 100644
index 00000000..364d9d57
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Default.cs
@@ -0,0 +1,34 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ [VtblIndex(0)]
+ public void MyVoidMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(1)]
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(2)]
+ public int MyInt32Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(3)]
+ public void* MyVoidStarMethod()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Latest.cs
new file mode 100644
index 00000000..364d9d57
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Latest.cs
@@ -0,0 +1,34 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ [VtblIndex(0)]
+ public void MyVoidMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(1)]
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(2)]
+ public int MyInt32Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(3)]
+ public void* MyVoidStarMethod()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Preview.cs
new file mode 100644
index 00000000..364d9d57
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.CSharp.Preview.cs
@@ -0,0 +1,34 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public void** lpVtbl;
+
+ [VtblIndex(0)]
+ public void MyVoidMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(1)]
+ [return: NativeTypeName("signed char")]
+ public sbyte MyInt8Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(2)]
+ public int MyInt32Method()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+
+ [VtblIndex(3)]
+ public void* MyVoidStarMethod()
+ {
+ return ((delegate* unmanaged[Thiscall])(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Compatible.xml
new file mode 100644
index 00000000..41f836ed
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Compatible.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ MyStruct*
+
+
+
+ sbyte
+
+ MyStruct*
+
+
+
+ int
+
+ MyStruct*
+
+
+
+ void*
+
+ MyStruct*
+
+
+
+ void
+
+ fixed (MyStruct* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyVoidMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+
+
+
+ sbyte
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt8Method>((IntPtr)(lpVtbl[1]))(pThis);
+ }
+
+
+
+ int
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyInt32Method>((IntPtr)(lpVtbl[2]))(pThis);
+ }
+
+
+
+ void*
+
+ fixed (MyStruct* pThis = &this)
+ {
+ return Marshal.GetDelegateForFunctionPointer<_MyVoidStarMethod>((IntPtr)(lpVtbl[3]))(pThis);
+ }
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Default.xml
new file mode 100644
index 00000000..0b4addc7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Default.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStruct*, void>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ sbyte
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, sbyte>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ void*
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, void*>)(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Latest.xml
new file mode 100644
index 00000000..0b4addc7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Latest.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStruct*, void>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ sbyte
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, sbyte>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ void*
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, void*>)(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Preview.xml
new file mode 100644
index 00000000..0b4addc7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/CXXMethodDeclaration/VirtualWithVtblIndexAttributeTest.Xml.Preview.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStruct*, void>)(lpVtbl[0]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ sbyte
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, sbyte>)(lpVtbl[1]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ int
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, int>)(lpVtbl[2]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+ void*
+
+ return ((delegate* unmanaged[Thiscall]<MyStruct*, void*>)(lpVtbl[3]))((MyStruct*)Unsafe.AsPointer(ref this));
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedAdjacentString/AdjacentStringLiteralsAreConcatenated.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedAdjacentString/AdjacentStringLiteralsAreConcatenated.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..d2c6862e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedAdjacentString/AdjacentStringLiteralsAreConcatenated.CSharp.Latest.Windows.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ [Obsolete("Use Bar() or Baz() instead")]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/EnumDecl.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/EnumDecl.CSharp.cs
new file mode 100644
index 00000000..bff18e4a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/EnumDecl.CSharp.cs
@@ -0,0 +1,26 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum0
+ {
+ MyEnum_Value0,
+ }
+
+ [Obsolete]
+ public enum MyEnum1
+ {
+ MyEnum_Value1,
+ }
+
+ [Obsolete("This is obsolete.")]
+ public enum MyEnum2
+ {
+ MyEnum_Value2,
+ }
+
+ public enum MyEnum3
+ {
+ MyEnum_Value3,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/EnumDecl.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/EnumDecl.Xml.xml
new file mode 100644
index 00000000..ed2eb06b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/EnumDecl.Xml.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ int
+
+ int
+
+
+
+ Obsolete
+ int
+
+ int
+
+
+
+ Obsolete("This is obsolete.")
+ int
+
+ int
+
+
+
+ int
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDecl.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDecl.CSharp.cs
new file mode 100644
index 00000000..c5e4704b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDecl.CSharp.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static void MyFunction0()
+ {
+ }
+
+ [Obsolete]
+ public static void MyFunction1()
+ {
+ }
+
+ [Obsolete("This is obsolete.")]
+ public static void MyFunction2()
+ {
+ }
+
+ public static void MyFunction3()
+ {
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDecl.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDecl.Xml.xml
new file mode 100644
index 00000000..e4cf47e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDecl.Xml.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ void
+
+
+
+ Obsolete
+ void
+
+
+
+ Obsolete("This is obsolete.")
+ void
+
+
+
+ void
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDeclDllImport.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDeclDllImport.CSharp.cs
new file mode 100644
index 00000000..896dacec
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDeclDllImport.CSharp.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction0();
+
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ [Obsolete]
+ public static extern void MyFunction1();
+
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ [Obsolete("This is obsolete.")]
+ public static extern void MyFunction2();
+
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction3();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDeclDllImport.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDeclDllImport.Xml.xml
new file mode 100644
index 00000000..578c0cc6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncDeclDllImport.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ void
+
+
+ Obsolete
+ void
+
+
+ Obsolete("This is obsolete.")
+ void
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Compatible.cs
new file mode 100644
index 00000000..00b40b30
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Compatible.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void Callback0();
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ [Obsolete]
+ public delegate void Callback1();
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ [Obsolete("This is obsolete.")]
+ public delegate void Callback2();
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void Callback3();
+
+ public partial struct MyStruct0
+ {
+ [NativeTypeName("Callback0")]
+ public IntPtr _callback;
+ }
+
+ public partial struct MyStruct1
+ {
+ [NativeTypeName("Callback1")]
+ [Obsolete]
+ public IntPtr _callback;
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeTypeName("Callback2")]
+ [Obsolete("This is obsolete.")]
+ public IntPtr _callback;
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeTypeName("Callback3")]
+ public IntPtr _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Default.cs
new file mode 100644
index 00000000..75bb08ee
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Default.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct0
+ {
+ [NativeTypeName("Callback0")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct1
+ {
+ [NativeTypeName("Callback1")]
+ [Obsolete]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct2
+ {
+ [NativeTypeName("Callback2")]
+ [Obsolete("This is obsolete.")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct3
+ {
+ [NativeTypeName("Callback3")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Latest.cs
new file mode 100644
index 00000000..75bb08ee
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Latest.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct0
+ {
+ [NativeTypeName("Callback0")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct1
+ {
+ [NativeTypeName("Callback1")]
+ [Obsolete]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct2
+ {
+ [NativeTypeName("Callback2")]
+ [Obsolete("This is obsolete.")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct3
+ {
+ [NativeTypeName("Callback3")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Preview.cs
new file mode 100644
index 00000000..75bb08ee
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.CSharp.Preview.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct0
+ {
+ [NativeTypeName("Callback0")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct1
+ {
+ [NativeTypeName("Callback1")]
+ [Obsolete]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct2
+ {
+ [NativeTypeName("Callback2")]
+ [Obsolete("This is obsolete.")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public unsafe partial struct MyStruct3
+ {
+ [NativeTypeName("Callback3")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Compatible.xml
new file mode 100644
index 00000000..c3355605
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Compatible.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ void
+
+
+ Obsolete
+ void
+
+
+ Obsolete("This is obsolete.")
+ void
+
+
+ void
+
+
+
+ IntPtr
+
+
+
+
+ Obsolete
+ IntPtr
+
+
+
+
+ Obsolete("This is obsolete.")
+ IntPtr
+
+
+
+
+ IntPtr
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Default.xml
new file mode 100644
index 00000000..a3961046
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Default.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ Obsolete
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ Obsolete("This is obsolete.")
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Latest.xml
new file mode 100644
index 00000000..a3961046
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Latest.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ Obsolete
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ Obsolete("This is obsolete.")
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Preview.xml
new file mode 100644
index 00000000..a3961046
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/FuncPtrDecl.Xml.Preview.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ Obsolete
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ Obsolete("This is obsolete.")
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/InstanceFunc.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/InstanceFunc.CSharp.cs
new file mode 100644
index 00000000..d98eec88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/InstanceFunc.CSharp.cs
@@ -0,0 +1,29 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int MyFunction0()
+ {
+ return 0;
+ }
+
+ [Obsolete]
+ public int MyFunction1()
+ {
+ return 0;
+ }
+
+ [Obsolete("This is obsolete.")]
+ public int MyFunction2()
+ {
+ return 0;
+ }
+
+ public int MyFunction3()
+ {
+ return 0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/InstanceFunc.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/InstanceFunc.Xml.xml
new file mode 100644
index 00000000..31012923
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/InstanceFunc.Xml.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ int
+ return 0;
+
+
+ Obsolete
+ int
+ return 0;
+
+
+ Obsolete("This is obsolete.")
+ int
+ return 0;
+
+
+ int
+ return 0;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleEnumMembers.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleEnumMembers.CSharp.cs
new file mode 100644
index 00000000..6da00c2a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleEnumMembers.CSharp.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum
+ {
+ MyEnum_Value0,
+ [Obsolete]
+ MyEnum_Value1,
+ [Obsolete("This is obsolete.")]
+ MyEnum_Value2,
+ MyEnum_Value3,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleEnumMembers.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleEnumMembers.Xml.xml
new file mode 100644
index 00000000..f2a7a5db
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleEnumMembers.Xml.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+
+ Obsolete
+ int
+
+
+ Obsolete("This is obsolete.")
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleStructMembers_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleStructMembers_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..405acaa7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleStructMembers_int_5Fint.CSharp.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int r;
+
+ [Obsolete]
+ public int g;
+
+ [Obsolete("This is obsolete.")]
+ public int b;
+
+ public int a;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleStructMembers_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleStructMembers_int_5Fint.Xml.xml
new file mode 100644
index 00000000..62451fd1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleStructMembers_int_5Fint.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+ Obsolete
+ int
+
+
+ Obsolete("This is obsolete.")
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleTypedefStructMembers_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleTypedefStructMembers_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..405acaa7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleTypedefStructMembers_int_5Fint.CSharp.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int r;
+
+ [Obsolete]
+ public int g;
+
+ [Obsolete("This is obsolete.")]
+ public int b;
+
+ public int a;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleTypedefStructMembers_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleTypedefStructMembers_int_5Fint.Xml.xml
new file mode 100644
index 00000000..62451fd1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleTypedefStructMembers_int_5Fint.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+ Obsolete
+ int
+
+
+ Obsolete("This is obsolete.")
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleVarDecl_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleVarDecl_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..34fffe69
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleVarDecl_int_5Fint.CSharp.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyVariable0 = 0;
+
+ [Obsolete]
+ public static int MyVariable1 = 0;
+
+ [Obsolete("This is obsolete.")]
+ public static int MyVariable2 = 0;
+
+ public static int MyVariable3 = 0;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleVarDecl_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleVarDecl_int_5Fint.Xml.xml
new file mode 100644
index 00000000..f830a1f0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/SimpleVarDecl_int_5Fint.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ int
+
+ 0
+
+
+
+ Obsolete
+ int
+
+ 0
+
+
+
+ Obsolete("This is obsolete.")
+ int
+
+ 0
+
+
+
+ int
+
+ 0
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/StructDecl.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/StructDecl.CSharp.cs
new file mode 100644
index 00000000..faeadf2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/StructDecl.CSharp.cs
@@ -0,0 +1,26 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct0
+ {
+ public int r;
+ }
+
+ [Obsolete]
+ public partial struct MyStruct1
+ {
+ public int r;
+ }
+
+ [Obsolete("This is obsolete.")]
+ public partial struct MyStruct2
+ {
+ public int r;
+ }
+
+ public partial struct MyStruct3
+ {
+ public int r;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/StructDecl.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/StructDecl.Xml.xml
new file mode 100644
index 00000000..ffa4d12c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/StructDecl.Xml.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ int
+
+
+
+ Obsolete
+
+ int
+
+
+
+ Obsolete("This is obsolete.")
+
+ int
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/TypedefStructDecl.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/TypedefStructDecl.CSharp.cs
new file mode 100644
index 00000000..faeadf2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/TypedefStructDecl.CSharp.cs
@@ -0,0 +1,26 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct0
+ {
+ public int r;
+ }
+
+ [Obsolete]
+ public partial struct MyStruct1
+ {
+ public int r;
+ }
+
+ [Obsolete("This is obsolete.")]
+ public partial struct MyStruct2
+ {
+ public int r;
+ }
+
+ public partial struct MyStruct3
+ {
+ public int r;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/TypedefStructDecl.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/TypedefStructDecl.Xml.xml
new file mode 100644
index 00000000..ffa4d12c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DeprecatedToObsolete/TypedefStructDecl.Xml.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ int
+
+
+
+ Obsolete
+
+ int
+
+
+
+ Obsolete("This is obsolete.")
+
+ int
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_2E0_5F1_5F024_2E0.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_2E0_5F1_5F024_2E0.CSharp.cs
new file mode 100644
index 00000000..fea42c3f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_2E0_5F1_5F024_2E0.CSharp.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyClass
+ {
+ [NativeTypeName("const float")]
+ private const float x = 1_024.0;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_2E0_5F1_5F024_2E0.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_2E0_5F1_5F024_2E0.Xml.xml
new file mode 100644
index 00000000..6295e038
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_2E0_5F1_5F024_2E0.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ float
+
+ 1_024.0
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_5F1_5F024.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_5F1_5F024.CSharp.cs
new file mode 100644
index 00000000..19fda2dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_5F1_5F024.CSharp.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyClass
+ {
+ [NativeTypeName("const float")]
+ private const float x = 1_024;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_5F1_5F024.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_5F1_5F024.Xml.xml
new file mode 100644
index 00000000..aa894cd0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_float_5F1_27024_5F1_5F024.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ float
+
+ 1_024
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27000_27001_5F1_5F000_5F001.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27000_27001_5F1_5F000_5F001.CSharp.cs
new file mode 100644
index 00000000..7dc04436
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27000_27001_5F1_5F000_5F001.CSharp.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyClass
+ {
+ [NativeTypeName("const int")]
+ private const int x = 1_000_001;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27000_27001_5F1_5F000_5F001.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27000_27001_5F1_5F000_5F001.Xml.xml
new file mode 100644
index 00000000..d3a99a20
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27000_27001_5F1_5F000_5F001.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ int
+
+ 1_000_001
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27024_5F1_5F024.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27024_5F1_5F024.CSharp.cs
new file mode 100644
index 00000000..2eb64590
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27024_5F1_5F024.CSharp.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyClass
+ {
+ [NativeTypeName("const int")]
+ private const int x = 1_024;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27024_5F1_5F024.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27024_5F1_5F024.Xml.xml
new file mode 100644
index 00000000..88c7e78d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/DigitsSeparator/StaticConstExprTest_int_5F1_27024_5F1_5F024.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ int
+
+ 1_024
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicTest.CSharp.cs
new file mode 100644
index 00000000..2fdb2f06
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicTest.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicTest.Xml.xml
new file mode 100644
index 00000000..f9df59a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicTest.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicValueTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicValueTest.CSharp.cs
new file mode 100644
index 00000000..a2b01b2d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicValueTest.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum
+ {
+ MyEnum_Value1 = 1,
+ MyEnum_Value2,
+ MyEnum_Value3,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicValueTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicValueTest.Xml.xml
new file mode 100644
index 00000000..05fb68d4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/BasicValueTest.Xml.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ int
+
+ int
+
+ 1
+
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExcludeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExcludeTest.CSharp.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExcludeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExcludeTest.Xml.xml
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedTest_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedTest_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..39444ef2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedTest_short_5Fshort.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum : short
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedTest_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedTest_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..37f04fdc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedTest_short_5Fshort.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ short
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
new file mode 100644
index 00000000..016fbc5f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("long long")]
+ public enum MyEnum : long
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_long_20long_5Flong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
new file mode 100644
index 00000000..599d4877
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ long
+
+ long
+
+
+ long
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
new file mode 100644
index 00000000..468387f1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("signed char")]
+ public enum MyEnum : sbyte
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
new file mode 100644
index 00000000..d14a1566
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ sbyte
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..14cacb0b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned char")]
+ public enum MyEnum : byte
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
new file mode 100644
index 00000000..f63a4d86
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ byte
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
new file mode 100644
index 00000000..0ed5362f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned int")]
+ public enum MyEnum : uint
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
new file mode 100644
index 00000000..005e362f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ uint
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
new file mode 100644
index 00000000..9863a1d8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned long long")]
+ public enum MyEnum : ulong
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
new file mode 100644
index 00000000..61d3c28b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ ulong
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
new file mode 100644
index 00000000..afca334d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("unsigned short")]
+ public enum MyEnum : ushort
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
new file mode 100644
index 00000000..488775b9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/ExplicitTypedWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ ushort
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/RemapTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/RemapTest.CSharp.cs
new file mode 100644
index 00000000..f4629b97
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/RemapTest.CSharp.cs
@@ -0,0 +1,30 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum1
+ {
+ MyEnum1_Value1,
+ MyEnum1_Value2,
+ MyEnum1_Value3,
+ }
+
+ public enum MyEnum2
+ {
+ MyEnum2_Value1,
+ MyEnum2_Value2,
+ MyEnum2_Value3,
+ }
+
+ public enum MyEnum3
+ {
+ MyEnum3_Value1,
+ MyEnum3_Value2,
+ MyEnum3_Value3,
+ }
+
+ public enum MyEnum4
+ {
+ MyEnum4_Value1,
+ MyEnum4_Value2,
+ MyEnum4_Value3,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/RemapTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/RemapTest.Xml.xml
new file mode 100644
index 00000000..df2395fc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/RemapTest.Xml.xml
@@ -0,0 +1,53 @@
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..1ba5fe8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..4e3236cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..1ba5fe8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Default.Unix.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..4e3236cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Default.Windows.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..1ba5fe8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..4e3236cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..1ba5fe8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..4e3236cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.Methods;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..26f7ce06
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..4a4dc354
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ int
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..26f7ce06
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Default.Unix.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..4a4dc354
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Default.Windows.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ int
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..26f7ce06
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Latest.Unix.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..4a4dc354
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Latest.Windows.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ int
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..26f7ce06
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Preview.Unix.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..4a4dc354
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAnonymousEnumTest.Xml.Preview.Windows.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
+ int
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAttributeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAttributeTest.CSharp.cs
new file mode 100644
index 00000000..99f3c671
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAttributeTest.CSharp.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ [Flags]
+ public enum MyEnum1
+ {
+ MyEnum1_Value1 = 1,
+ }
+
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = 1,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAttributeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAttributeTest.Xml.xml
new file mode 100644
index 00000000..342450a9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithAttributeTest.Xml.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ Flags
+ int
+
+ int
+
+ 1
+
+
+
+
+ int
+
+ int
+
+ 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithCastToEnumType.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithCastToEnumType.CSharp.cs
new file mode 100644
index 00000000..9970e625
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithCastToEnumType.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum
+ {
+ MyEnum_Value0 = (int)(MyEnum)(10),
+ MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0),
+ MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithCastToEnumType.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithCastToEnumType.Xml.xml
new file mode 100644
index 00000000..7e684d84
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithCastToEnumType.Xml.xml
@@ -0,0 +1,26 @@
+
+
+
+
+ int
+
+ int
+
+ (int)(MyEnum)(10)
+
+
+
+ int
+
+ (int)(MyEnum)(MyEnum_Value0)
+
+
+
+ int
+
+ ((int)(MyEnum)(10)) + MyEnum_Value1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithImplicitConversionTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithImplicitConversionTest.CSharp.cs
new file mode 100644
index 00000000..403d87a8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithImplicitConversionTest.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2 = unchecked((int)(0x80000000)),
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithImplicitConversionTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithImplicitConversionTest.Xml.xml
new file mode 100644
index 00000000..e662876c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithImplicitConversionTest.Xml.xml
@@ -0,0 +1,27 @@
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+ 0x80000000
+
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithMultipleEnumsTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithMultipleEnumsTest.CSharp.cs
new file mode 100644
index 00000000..b7334681
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithMultipleEnumsTest.CSharp.cs
@@ -0,0 +1,15 @@
+using static ClangSharp.Test.MyEnum1;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum1
+ {
+ MyEnum1_Value0 = 10,
+ }
+
+ public enum MyEnum2
+ {
+ MyEnum2_Value0 = MyEnum1_Value0,
+ MyEnum2_Value1 = MyEnum1_Value0 + (int)(MyEnum1)(10),
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithMultipleEnumsTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithMultipleEnumsTest.Xml.xml
new file mode 100644
index 00000000..246269d6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithMultipleEnumsTest.Xml.xml
@@ -0,0 +1,29 @@
+
+
+
+
+ int
+
+ int
+
+ 10
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value0
+
+
+
+ int
+
+ MyEnum1_Value0 + (int)(MyEnum1)(10)
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarPlusTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarPlusTest.CSharp.cs
new file mode 100644
index 00000000..9e34d3ae
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarPlusTest.CSharp.cs
@@ -0,0 +1,15 @@
+using System;
+using static ClangSharp.Test.MyEnum1;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum1
+ {
+ MyEnum1_Value1 = 1,
+ }
+
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarPlusTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarPlusTest.Xml.xml
new file mode 100644
index 00000000..2accd163
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarPlusTest.Xml.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ int
+
+ int
+
+ 1
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarTest.CSharp.cs
new file mode 100644
index 00000000..31d97b83
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarTest.CSharp.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.MyEnum1;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum1
+ {
+ MyEnum1_Value1 = 1,
+ }
+
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarTest.Xml.xml
new file mode 100644
index 00000000..2accd163
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceStarTest.Xml.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ int
+
+ int
+
+ 1
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceTest.CSharp.cs
new file mode 100644
index 00000000..31d97b83
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceTest.CSharp.cs
@@ -0,0 +1,14 @@
+using static ClangSharp.Test.MyEnum1;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum1
+ {
+ MyEnum1_Value1 = 1,
+ }
+
+ public enum MyEnum2
+ {
+ MyEnum2_Value1 = MyEnum1_Value1,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceTest.Xml.xml
new file mode 100644
index 00000000..2accd163
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithNamespaceTest.Xml.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ int
+
+ int
+
+ 1
+
+
+
+
+ int
+
+ int
+
+ MyEnum1_Value1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..2cd4bd84
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..640829ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..2cd4bd84
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Default.Unix.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..640829ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Default.Windows.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..2cd4bd84
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..640829ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..2cd4bd84
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const uint MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..640829ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public const int MyEnum1_Value1 = 1;
+
+ [NativeTypeName("const int")]
+ public const int MyEnum2_Value1 = (int)(MyEnum1_Value1) + 1;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..b8274035
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..725ba5ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..b8274035
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Default.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..725ba5ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Default.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..b8274035
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Latest.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..725ba5ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Latest.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..b8274035
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Preview.Unix.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ uint
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..725ba5ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithReferenceToAnonymousEnumEnumeratorTest.Xml.Preview.Windows.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+ 1
+
+
+
+ int
+
+ (int)(MyEnum1_Value1) + 1
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeAndImplicitConversionTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeAndImplicitConversionTest.CSharp.cs
new file mode 100644
index 00000000..de571b8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeAndImplicitConversionTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("int")]
+ public enum MyEnum : uint
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2 = 0x80000000,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeAndImplicitConversionTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeAndImplicitConversionTest.Xml.xml
new file mode 100644
index 00000000..af859643
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeAndImplicitConversionTest.Xml.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ uint
+
+ uint
+
+
+ uint
+
+
+ uint
+
+ 0x80000000
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarOverrideTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarOverrideTest.CSharp.cs
new file mode 100644
index 00000000..659d112c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarOverrideTest.CSharp.cs
@@ -0,0 +1,13 @@
+namespace ClangSharp.Test
+{
+ public enum MyEnum1
+ {
+ MyEnum1_Value0,
+ }
+
+ [NativeTypeName("int")]
+ public enum MyEnum2 : uint
+ {
+ MyEnum2_Value0,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarOverrideTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarOverrideTest.Xml.xml
new file mode 100644
index 00000000..002e9e19
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarOverrideTest.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ int
+
+ int
+
+
+
+ uint
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarTest.CSharp.cs
new file mode 100644
index 00000000..5bd310a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarTest.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("int")]
+ public enum MyEnum1 : uint
+ {
+ MyEnum1_Value0,
+ }
+
+ [NativeTypeName("int")]
+ public enum MyEnum2 : uint
+ {
+ MyEnum2_Value0,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarTest.Xml.xml
new file mode 100644
index 00000000..ef4accb4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeStarTest.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ uint
+
+ uint
+
+
+
+ uint
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeTest.CSharp.cs
new file mode 100644
index 00000000..092a29dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ [NativeTypeName("int")]
+ public enum MyEnum : uint
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeTest.Xml.xml
new file mode 100644
index 00000000..005e362f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/EnumDeclaration/WithTypeTest.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ uint
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/MembersAfterFirstAreNotOverIndented.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/MembersAfterFirstAreNotOverIndented.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..0eebe990
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/MembersAfterFirstAreNotOverIndented.CSharp.Latest.Windows.cs
@@ -0,0 +1,22 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test;
+
+public partial struct Point
+{
+ public int x;
+
+ public int y;
+}
+
+public enum Color
+{
+ Red,
+ Green,
+}
+
+public static partial class Methods
+{
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/MethodClassHasNoTrailingBrace.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/MethodClassHasNoTrailingBrace.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..d3da22d7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/MethodClassHasNoTrailingBrace.CSharp.Latest.Windows.cs
@@ -0,0 +1,9 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test;
+
+public static partial class Methods
+{
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/StructHasNoTrailingBrace.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/StructHasNoTrailingBrace.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..d88702e0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FileScopedNamespace/StructHasNoTrailingBrace.CSharp.Latest.Windows.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test;
+
+public partial struct Point
+{
+ public int x;
+
+ public int y;
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FixedBufferIndexerOverloads/GeneratesOnlyIntIndexerWhenDisabled.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FixedBufferIndexerOverloads/GeneratesOnlyIntIndexerWhenDisabled.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..21094ff5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FixedBufferIndexerOverloads/GeneratesOnlyIntIndexerWhenDisabled.CSharp.Compatible.Windows.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FixedBufferIndexerOverloads/GeneratesOverloadsWhenEnabled.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FixedBufferIndexerOverloads/GeneratesOverloadsWhenEnabled.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..8b32f940
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FixedBufferIndexerOverloads/GeneratesOverloadsWhenEnabled.CSharp.Compatible.Windows.cs
@@ -0,0 +1,64 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+
+ public unsafe ref MyStruct this[uint index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+
+ public unsafe ref MyStruct this[nint index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+
+ public unsafe ref MyStruct this[nuint index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..3cfe222f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref int a
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->a;
+ }
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int a;
+ }
+ }
+
+ public static partial class Methods
+ {
+ public static void MyFunction()
+ {
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Default.cs
new file mode 100644
index 00000000..d0cd9021
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Default.cs
@@ -0,0 +1,37 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int a;
+ }
+ }
+
+ public static partial class Methods
+ {
+ public static void MyFunction()
+ {
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Latest.cs
new file mode 100644
index 00000000..d0cd9021
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Latest.cs
@@ -0,0 +1,37 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int a;
+ }
+ }
+
+ public static partial class Methods
+ {
+ public static void MyFunction()
+ {
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Preview.cs
new file mode 100644
index 00000000..d0cd9021
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.CSharp.Preview.cs
@@ -0,0 +1,37 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int a;
+ }
+ }
+
+ public static partial class Methods
+ {
+ public static void MyFunction()
+ {
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Compatible.xml
new file mode 100644
index 00000000..06828316
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Compatible.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->a;
+ }
+
+
+
+
+ int
+
+
+
+
+
+ void
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Default.xml
new file mode 100644
index 00000000..dabae223
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Default.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.a;
+
+
+
+
+ int
+
+
+
+
+
+ void
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Latest.xml
new file mode 100644
index 00000000..dabae223
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Latest.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.a;
+
+
+
+
+ int
+
+
+
+
+
+ void
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Preview.xml
new file mode 100644
index 00000000..dabae223
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/AccessUnionMemberTest.Xml.Preview.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.a;
+
+
+
+
+ int
+
+
+
+
+
+ void
+ MyUnion myUnion = new MyUnion();
+
+ myUnion.Anonymous.a = 10;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ArraySubscriptTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ArraySubscriptTest.CSharp.cs
new file mode 100644
index 00000000..ad4fe443
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ArraySubscriptTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static int MyFunction(int* pData, int index)
+ {
+ return pData[index];
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ArraySubscriptTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ArraySubscriptTest.Xml.xml
new file mode 100644
index 00000000..90c7ba99
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ArraySubscriptTest.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int*
+
+
+ int
+
+ return pData[index];
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BasicTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BasicTest.CSharp.cs
new file mode 100644
index 00000000..68762ff7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BasicTest.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static void MyFunction()
+ {
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BasicTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BasicTest.Xml.xml
new file mode 100644
index 00000000..9d7e1575
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BasicTest.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ void
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25.CSharp.cs
new file mode 100644
index 00000000..4da2b4bb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x % y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25.Xml.xml
new file mode 100644
index 00000000..044ceb7a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x % y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25_3D.CSharp.cs
new file mode 100644
index 00000000..72e36e91
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x %= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25_3D.Xml.xml
new file mode 100644
index 00000000..a9b11f35
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__25_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x %= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26.CSharp.cs
new file mode 100644
index 00000000..47d5830e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x & y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26.Xml.xml
new file mode 100644
index 00000000..8a8285f3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x & y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26_3D.CSharp.cs
new file mode 100644
index 00000000..d786db3f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x &= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26_3D.Xml.xml
new file mode 100644
index 00000000..6a3d3ef9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__26_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x &= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A.CSharp.cs
new file mode 100644
index 00000000..785c82cd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x * y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A.Xml.xml
new file mode 100644
index 00000000..ae471b1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x * y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A_3D.CSharp.cs
new file mode 100644
index 00000000..62a03115
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x *= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A_3D.Xml.xml
new file mode 100644
index 00000000..0d2ba5c0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2A_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x *= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B.CSharp.cs
new file mode 100644
index 00000000..d2a42be1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x + y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B.Xml.xml
new file mode 100644
index 00000000..2e3943b9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x + y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B_3D.CSharp.cs
new file mode 100644
index 00000000..0fa06060
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x += y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B_3D.Xml.xml
new file mode 100644
index 00000000..e590b55c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2B_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x += y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D.CSharp.cs
new file mode 100644
index 00000000..5bcdd615
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x - y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D.Xml.xml
new file mode 100644
index 00000000..0794d0e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x - y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D_3D.CSharp.cs
new file mode 100644
index 00000000..8d80a1cc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x -= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D_3D.Xml.xml
new file mode 100644
index 00000000..24ee63cc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2D_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x -= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F.CSharp.cs
new file mode 100644
index 00000000..1375e4bd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x / y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F.Xml.xml
new file mode 100644
index 00000000..a13997be
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x / y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F_3D.CSharp.cs
new file mode 100644
index 00000000..34e7b975
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x /= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F_3D.Xml.xml
new file mode 100644
index 00000000..0422c4ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__2F_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x /= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C.CSharp.cs
new file mode 100644
index 00000000..15b8b654
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x << y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C.Xml.xml
new file mode 100644
index 00000000..45707086
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x << y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C_3D.CSharp.cs
new file mode 100644
index 00000000..78a80adf
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x <<= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C_3D.Xml.xml
new file mode 100644
index 00000000..819a82cd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3C_3C_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x <<= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3D.CSharp.cs
new file mode 100644
index 00000000..c3cd2099
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x = y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3D.Xml.xml
new file mode 100644
index 00000000..d6b5fa3a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x = y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E.CSharp.cs
new file mode 100644
index 00000000..7bd9af47
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x >> y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E.Xml.xml
new file mode 100644
index 00000000..61ead84c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x >> y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E_3D.CSharp.cs
new file mode 100644
index 00000000..114dfe94
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x >>= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E_3D.Xml.xml
new file mode 100644
index 00000000..c8e42a8d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__3E_3E_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x >>= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E.CSharp.cs
new file mode 100644
index 00000000..c5fe7077
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x ^ y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E.Xml.xml
new file mode 100644
index 00000000..e8245844
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x ^ y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E_3D.CSharp.cs
new file mode 100644
index 00000000..3195189b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x ^= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E_3D.Xml.xml
new file mode 100644
index 00000000..65188504
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__5E_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x ^= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C.CSharp.cs
new file mode 100644
index 00000000..866b64a3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x | y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C.Xml.xml
new file mode 100644
index 00000000..421fa861
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x | y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C_3D.CSharp.cs
new file mode 100644
index 00000000..c719c190
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int x, int y)
+ {
+ return x |= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C_3D.Xml.xml
new file mode 100644
index 00000000..77484443
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBasicTest__7C_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+ return x |= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__26_26.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__26_26.CSharp.cs
new file mode 100644
index 00000000..94478e5d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__26_26.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(bool x, bool y)
+ {
+ return x && y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__26_26.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__26_26.Xml.xml
new file mode 100644
index 00000000..cee04571
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__26_26.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ bool
+
+
+ bool
+
+ return x && y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__7C_7C.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__7C_7C.CSharp.cs
new file mode 100644
index 00000000..800c8d60
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__7C_7C.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(bool x, bool y)
+ {
+ return x || y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__7C_7C.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__7C_7C.Xml.xml
new file mode 100644
index 00000000..6ff94797
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorBooleanTest__7C_7C.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ bool
+
+
+ bool
+
+ return x || y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__21_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__21_3D.CSharp.cs
new file mode 100644
index 00000000..297eb581
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__21_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(int x, int y)
+ {
+ return x != y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__21_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__21_3D.Xml.xml
new file mode 100644
index 00000000..81dac47a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__21_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ int
+
+
+ int
+
+ return x != y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C.CSharp.cs
new file mode 100644
index 00000000..8a62045c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(int x, int y)
+ {
+ return x < y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C.Xml.xml
new file mode 100644
index 00000000..f69caa39
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ int
+
+
+ int
+
+ return x < y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C_3D.CSharp.cs
new file mode 100644
index 00000000..a2e5eab8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(int x, int y)
+ {
+ return x <= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C_3D.Xml.xml
new file mode 100644
index 00000000..7ae8c808
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3C_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ int
+
+
+ int
+
+ return x <= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3D_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3D_3D.CSharp.cs
new file mode 100644
index 00000000..0c94c881
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3D_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(int x, int y)
+ {
+ return x == y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3D_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3D_3D.Xml.xml
new file mode 100644
index 00000000..bf0ba6e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3D_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ int
+
+
+ int
+
+ return x == y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E.CSharp.cs
new file mode 100644
index 00000000..2ab09b4e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(int x, int y)
+ {
+ return x > y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E.Xml.xml
new file mode 100644
index 00000000..441d9508
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ int
+
+
+ int
+
+ return x > y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E_3D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E_3D.CSharp.cs
new file mode 100644
index 00000000..7dcf453f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E_3D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(int x, int y)
+ {
+ return x >= y;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E_3D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E_3D.Xml.xml
new file mode 100644
index 00000000..de135332
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BinaryOperatorCompareTest__3E_3D.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ bool
+
+ int
+
+
+ int
+
+ return x >= y;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BreakTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BreakTest.CSharp.cs
new file mode 100644
index 00000000..210a914f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BreakTest.CSharp.cs
@@ -0,0 +1,15 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ while (true)
+ {
+ break;
+ }
+
+ return 0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BreakTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BreakTest.Xml.xml
new file mode 100644
index 00000000..b074d282
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/BreakTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+ int
+
+ while (true)
+ {
+ break;
+ }
+
+ return 0;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CStyleFunctionalCastTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CStyleFunctionalCastTest.CSharp.cs
new file mode 100644
index 00000000..10bb563b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CStyleFunctionalCastTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(float input)
+ {
+ return (int)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CStyleFunctionalCastTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CStyleFunctionalCastTest.Xml.xml
new file mode 100644
index 00000000..ea58cedb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CStyleFunctionalCastTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ float
+
+ return (int)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionTest.CSharp.cs
new file mode 100644
index 00000000..edfc6a34
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionTest.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static void MyCalledFunction()
+ {
+ }
+
+ public static void MyFunction()
+ {
+ MyCalledFunction();
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionTest.Xml.xml
new file mode 100644
index 00000000..6f914d24
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionTest.Xml.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ void
+
+
+
+ void
+ MyCalledFunction();
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionWithArgsTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionWithArgsTest.CSharp.cs
new file mode 100644
index 00000000..915731c1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionWithArgsTest.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static void MyCalledFunction(int x, int y)
+ {
+ }
+
+ public static void MyFunction()
+ {
+ MyCalledFunction(0, 1);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionWithArgsTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionWithArgsTest.Xml.xml
new file mode 100644
index 00000000..9f1ccbf0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CallFunctionWithArgsTest.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ void
+
+ int
+
+
+ int
+
+
+
+
+ void
+ MyCalledFunction(0, 1);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseNoCompoundTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseNoCompoundTest.CSharp.cs
new file mode 100644
index 00000000..5455198a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseNoCompoundTest.CSharp.cs
@@ -0,0 +1,24 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ switch (value)
+ {
+ case 0:
+ {
+ return 0;
+ }
+
+ case 2:
+ case 3:
+ {
+ return 5;
+ }
+ }
+
+ return -1;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseNoCompoundTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseNoCompoundTest.Xml.xml
new file mode 100644
index 00000000..ec4d7978
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseNoCompoundTest.Xml.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+ int
+
+ int
+
+ switch (value)
+ {
+ case 0:
+ {
+ return 0;
+ }
+
+ case 2:
+ case 3:
+ {
+ return 5;
+ }
+ }
+
+ return -1;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseTest.CSharp.cs
new file mode 100644
index 00000000..8bfda41b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseTest.CSharp.cs
@@ -0,0 +1,24 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ switch (value)
+ {
+ case 0:
+ {
+ return 0;
+ }
+
+ case 1:
+ case 2:
+ {
+ return 3;
+ }
+ }
+
+ return -1;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseTest.Xml.xml
new file mode 100644
index 00000000..213f7724
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CaseTest.Xml.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+ int
+
+ int
+
+ switch (value)
+ {
+ case 0:
+ {
+ return 0;
+ }
+
+ case 1:
+ case 2:
+ {
+ return 3;
+ }
+ }
+
+ return -1;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CompareMultipleEnumTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CompareMultipleEnumTest.CSharp.cs
new file mode 100644
index 00000000..373b635a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CompareMultipleEnumTest.CSharp.cs
@@ -0,0 +1,19 @@
+using static ClangSharp.Test.MyEnum;
+
+namespace ClangSharp.Test
+{
+ public enum MyEnum
+ {
+ MyEnum_Value0,
+ MyEnum_Value1,
+ MyEnum_Value2,
+ }
+
+ public static partial class Methods
+ {
+ public static int MyFunction(MyEnum x)
+ {
+ return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CompareMultipleEnumTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CompareMultipleEnumTest.Xml.xml
new file mode 100644
index 00000000..500b3b31
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CompareMultipleEnumTest.Xml.xml
@@ -0,0 +1,26 @@
+
+
+
+
+ int
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
+ int
+
+ MyEnum
+
+ return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ConditionalOperatorTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ConditionalOperatorTest.CSharp.cs
new file mode 100644
index 00000000..c6d43d85
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ConditionalOperatorTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(bool condition, int lhs, int rhs)
+ {
+ return condition ? lhs : rhs;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ConditionalOperatorTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ConditionalOperatorTest.Xml.xml
new file mode 100644
index 00000000..97ea7e10
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ConditionalOperatorTest.Xml.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ int
+
+ bool
+
+
+ int
+
+
+ int
+
+ return condition ? lhs : rhs;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ContinueTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ContinueTest.CSharp.cs
new file mode 100644
index 00000000..c01ed821
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ContinueTest.CSharp.cs
@@ -0,0 +1,15 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ while (true)
+ {
+ continue;
+ }
+
+ return 0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ContinueTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ContinueTest.Xml.xml
new file mode 100644
index 00000000..ef206625
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ContinueTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+ int
+
+ while (true)
+ {
+ continue;
+ }
+
+ return 0;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxConstCastTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxConstCastTest.CSharp.cs
new file mode 100644
index 00000000..8cfe9f5f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxConstCastTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static void* MyFunction([NativeTypeName("const void *")] void* input)
+ {
+ return input;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxConstCastTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxConstCastTest.Xml.xml
new file mode 100644
index 00000000..e28dfd48
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxConstCastTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ void*
+
+ void*
+
+ return input;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..9b949b10
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Compatible.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStructA
+ {
+ public void** lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate void _MyMethod(MyStructA* pThis);
+
+ public void MyMethod()
+ {
+ fixed (MyStructA* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+ }
+ }
+
+ [NativeTypeName("struct MyStructB : MyStructA")]
+ public unsafe partial struct MyStructB
+ {
+ public void** lpVtbl;
+
+ [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
+ public delegate void _MyMethod(MyStructB* pThis);
+
+ public void MyMethod()
+ {
+ fixed (MyStructB* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+ }
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static MyStructB* MyFunction(MyStructA* input)
+ {
+ return (MyStructB*)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Default.cs
new file mode 100644
index 00000000..822b63f0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Default.cs
@@ -0,0 +1,33 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStructA
+ {
+ public void** lpVtbl;
+
+ public void MyMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStructA*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct MyStructB : MyStructA")]
+ public unsafe partial struct MyStructB
+ {
+ public void** lpVtbl;
+
+ public void MyMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStructB*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static MyStructB* MyFunction(MyStructA* input)
+ {
+ return (MyStructB*)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Latest.cs
new file mode 100644
index 00000000..822b63f0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Latest.cs
@@ -0,0 +1,33 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStructA
+ {
+ public void** lpVtbl;
+
+ public void MyMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStructA*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct MyStructB : MyStructA")]
+ public unsafe partial struct MyStructB
+ {
+ public void** lpVtbl;
+
+ public void MyMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStructB*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static MyStructB* MyFunction(MyStructA* input)
+ {
+ return (MyStructB*)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Preview.cs
new file mode 100644
index 00000000..822b63f0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.CSharp.Preview.cs
@@ -0,0 +1,33 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStructA
+ {
+ public void** lpVtbl;
+
+ public void MyMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStructA*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct MyStructB : MyStructA")]
+ public unsafe partial struct MyStructB
+ {
+ public void** lpVtbl;
+
+ public void MyMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((MyStructB*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static MyStructB* MyFunction(MyStructA* input)
+ {
+ return (MyStructB*)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Compatible.xml
new file mode 100644
index 00000000..71ec32f4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Compatible.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ MyStructA*
+
+
+
+ void
+
+ fixed (MyStructA* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+
+
+
+
+
+ void**
+
+
+ void
+
+ MyStructB*
+
+
+
+ void
+
+ fixed (MyStructB* pThis = &this)
+ {
+ Marshal.GetDelegateForFunctionPointer<_MyMethod>((IntPtr)(lpVtbl[0]))(pThis);
+ }
+
+
+
+
+
+ MyStructB*
+
+ MyStructA*
+
+ return (MyStructB*)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Default.xml
new file mode 100644
index 00000000..f9669ca6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Default.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStructA*, void>)(lpVtbl[0]))((MyStructA*)Unsafe.AsPointer(ref this));
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStructB*, void>)(lpVtbl[0]))((MyStructB*)Unsafe.AsPointer(ref this));
+
+
+
+
+
+ MyStructB*
+
+ MyStructA*
+
+ return (MyStructB*)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Latest.xml
new file mode 100644
index 00000000..f9669ca6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Latest.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStructA*, void>)(lpVtbl[0]))((MyStructA*)Unsafe.AsPointer(ref this));
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStructB*, void>)(lpVtbl[0]))((MyStructB*)Unsafe.AsPointer(ref this));
+
+
+
+
+
+ MyStructB*
+
+ MyStructA*
+
+ return (MyStructB*)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Preview.xml
new file mode 100644
index 00000000..f9669ca6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxDynamicCastTest.Xml.Preview.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStructA*, void>)(lpVtbl[0]))((MyStructA*)Unsafe.AsPointer(ref this));
+
+
+
+
+
+ void**
+
+
+ void
+
+ ((delegate* unmanaged[Thiscall]<MyStructB*, void>)(lpVtbl[0]))((MyStructB*)Unsafe.AsPointer(ref this));
+
+
+
+
+
+ MyStructB*
+
+ MyStructA*
+
+ return (MyStructB*)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxFunctionalCastTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxFunctionalCastTest.CSharp.cs
new file mode 100644
index 00000000..10bb563b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxFunctionalCastTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(float input)
+ {
+ return (int)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxFunctionalCastTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxFunctionalCastTest.Xml.xml
new file mode 100644
index 00000000..ea58cedb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxFunctionalCastTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ float
+
+ return (int)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxReinterpretCastTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxReinterpretCastTest.CSharp.cs
new file mode 100644
index 00000000..4c8db4a3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxReinterpretCastTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static int* MyFunction(void* input)
+ {
+ return (int*)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxReinterpretCastTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxReinterpretCastTest.Xml.xml
new file mode 100644
index 00000000..a126989a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxReinterpretCastTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int*
+
+ void*
+
+ return (int*)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxStaticCastTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxStaticCastTest.CSharp.cs
new file mode 100644
index 00000000..4c8db4a3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxStaticCastTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static int* MyFunction(void* input)
+ {
+ return (int*)(input);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxStaticCastTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxStaticCastTest.Xml.xml
new file mode 100644
index 00000000..a126989a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/CxxStaticCastTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int*
+
+ void*
+
+ return (int*)(input);
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DeclTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DeclTest.CSharp.cs
new file mode 100644
index 00000000..06b3fbb2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DeclTest.CSharp.cs
@@ -0,0 +1,13 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction()
+ {
+ int x = 0;
+ int y = 1, z = 2;
+
+ return x + y + z;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DeclTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DeclTest.Xml.xml
new file mode 100644
index 00000000..350b7d46
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DeclTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+ int x = 0;
+ int y = 1, z = 2;
+
+ return x + y + z;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoNonCompoundTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoNonCompoundTest.CSharp.cs
new file mode 100644
index 00000000..6b312efe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoNonCompoundTest.CSharp.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int count)
+ {
+ int i = 0;
+
+ while (i < count)
+ {
+ i++;
+ }
+
+ return i;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoNonCompoundTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoNonCompoundTest.Xml.xml
new file mode 100644
index 00000000..5ab45ec1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoNonCompoundTest.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+ int
+
+ int i = 0;
+
+ while (i < count)
+ {
+ i++;
+ }
+
+ return i;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoTest.CSharp.cs
new file mode 100644
index 00000000..f7a3d222
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoTest.CSharp.cs
@@ -0,0 +1,18 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int count)
+ {
+ int i = 0;
+
+ do
+ {
+ i++;
+ }
+ while (i < count);
+
+ return i;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoTest.Xml.xml
new file mode 100644
index 00000000..2bca7ca2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/DoTest.Xml.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ int
+
+ int
+
+ int i = 0;
+
+ do
+ {
+ i++;
+ }
+ while (i < count);
+
+ return i;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForNonCompoundTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForNonCompoundTest.CSharp.cs
new file mode 100644
index 00000000..a2658360
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForNonCompoundTest.CSharp.cs
@@ -0,0 +1,67 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int count)
+ {
+ for (int i = 0; i < count; i--)
+ {
+ i += 2;
+ }
+
+ int x;
+
+ for (x = 0; x < count; x--)
+ {
+ x += 2;
+ }
+
+ x = 0;
+ for (; x < count; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0;; i--)
+ {
+ i += 2;
+ }
+
+ for (x = 0;; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0; i < count;)
+ {
+ i++;
+ }
+
+ for (x = 0; x < count;)
+ {
+ x++;
+ }
+
+ x = 0;
+ for (; x < count;)
+ {
+ x++;
+ }
+
+ for (int i = 0;;)
+ {
+ i++;
+ }
+
+ for (x = 0;;)
+ {
+ x++;
+ }
+
+ for (;;)
+ {
+ return -1;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForNonCompoundTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForNonCompoundTest.Xml.xml
new file mode 100644
index 00000000..7bdb3bdb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForNonCompoundTest.Xml.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+ int
+
+ int
+
+ for (int i = 0; i < count; i--)
+ {
+ i += 2;
+ }
+
+ int x;
+
+ for (x = 0; x < count; x--)
+ {
+ x += 2;
+ }
+
+ x = 0;
+ for (; x < count; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0;; i--)
+ {
+ i += 2;
+ }
+
+ for (x = 0;; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0; i < count;)
+ {
+ i++;
+ }
+
+ for (x = 0; x < count;)
+ {
+ x++;
+ }
+
+ x = 0;
+ for (; x < count;)
+ {
+ x++;
+ }
+
+ for (int i = 0;;)
+ {
+ i++;
+ }
+
+ for (x = 0;;)
+ {
+ x++;
+ }
+
+ for (;;)
+ {
+ return -1;
+ }
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForTest.CSharp.cs
new file mode 100644
index 00000000..a2658360
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForTest.CSharp.cs
@@ -0,0 +1,67 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int count)
+ {
+ for (int i = 0; i < count; i--)
+ {
+ i += 2;
+ }
+
+ int x;
+
+ for (x = 0; x < count; x--)
+ {
+ x += 2;
+ }
+
+ x = 0;
+ for (; x < count; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0;; i--)
+ {
+ i += 2;
+ }
+
+ for (x = 0;; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0; i < count;)
+ {
+ i++;
+ }
+
+ for (x = 0; x < count;)
+ {
+ x++;
+ }
+
+ x = 0;
+ for (; x < count;)
+ {
+ x++;
+ }
+
+ for (int i = 0;;)
+ {
+ i++;
+ }
+
+ for (x = 0;;)
+ {
+ x++;
+ }
+
+ for (;;)
+ {
+ return -1;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForTest.Xml.xml
new file mode 100644
index 00000000..7bdb3bdb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ForTest.Xml.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+ int
+
+ int
+
+ for (int i = 0; i < count; i--)
+ {
+ i += 2;
+ }
+
+ int x;
+
+ for (x = 0; x < count; x--)
+ {
+ x += 2;
+ }
+
+ x = 0;
+ for (; x < count; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0;; i--)
+ {
+ i += 2;
+ }
+
+ for (x = 0;; x--)
+ {
+ x += 2;
+ }
+
+ for (int i = 0; i < count;)
+ {
+ i++;
+ }
+
+ for (x = 0; x < count;)
+ {
+ x++;
+ }
+
+ x = 0;
+ for (; x < count;)
+ {
+ x++;
+ }
+
+ for (int i = 0;;)
+ {
+ i++;
+ }
+
+ for (x = 0;;)
+ {
+ x++;
+ }
+
+ for (;;)
+ {
+ return -1;
+ }
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseIfTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseIfTest.CSharp.cs
new file mode 100644
index 00000000..32158b93
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseIfTest.CSharp.cs
@@ -0,0 +1,19 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(bool condition1, int a, int b, bool condition2, int c)
+ {
+ if (condition1)
+ {
+ return a;
+ }
+ else if (condition2)
+ {
+ return b;
+ }
+
+ return c;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseIfTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseIfTest.Xml.xml
new file mode 100644
index 00000000..851bfb4f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseIfTest.Xml.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+ int
+
+ bool
+
+
+ int
+
+
+ int
+
+
+ bool
+
+
+ int
+
+ if (condition1)
+ {
+ return a;
+ }
+ else if (condition2)
+ {
+ return b;
+ }
+
+ return c;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseNonCompoundTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseNonCompoundTest.CSharp.cs
new file mode 100644
index 00000000..9dd758ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseNonCompoundTest.CSharp.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(bool condition, int lhs, int rhs)
+ {
+ if (condition)
+ {
+ return lhs;
+ }
+ else
+ {
+ return rhs;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseNonCompoundTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseNonCompoundTest.Xml.xml
new file mode 100644
index 00000000..a0e537ca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseNonCompoundTest.Xml.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ int
+
+ bool
+
+
+ int
+
+
+ int
+
+ if (condition)
+ {
+ return lhs;
+ }
+ else
+ {
+ return rhs;
+ }
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseTest.CSharp.cs
new file mode 100644
index 00000000..9dd758ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseTest.CSharp.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(bool condition, int lhs, int rhs)
+ {
+ if (condition)
+ {
+ return lhs;
+ }
+ else
+ {
+ return rhs;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseTest.Xml.xml
new file mode 100644
index 00000000..a0e537ca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfElseTest.Xml.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ int
+
+ bool
+
+
+ int
+
+
+ int
+
+ if (condition)
+ {
+ return lhs;
+ }
+ else
+ {
+ return rhs;
+ }
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfTest.CSharp.cs
new file mode 100644
index 00000000..0dd6b07f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfTest.CSharp.cs
@@ -0,0 +1,15 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(bool condition, int lhs, int rhs)
+ {
+ if (condition)
+ {
+ return lhs;
+ }
+
+ return rhs;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfTest.Xml.xml
new file mode 100644
index 00000000..64972354
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/IfTest.Xml.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ int
+
+ bool
+
+
+ int
+
+
+ int
+
+ if (condition)
+ {
+ return lhs;
+ }
+
+ return rhs;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForArrayTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForArrayTest.CSharp.cs
new file mode 100644
index 00000000..d192847d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForArrayTest.CSharp.cs
@@ -0,0 +1,28 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static void MyFunction()
+ {
+ int[] x = new int[4]
+ {
+ 1,
+ 2,
+ 3,
+ 4,
+ };
+ int[] y = new int[4]
+ {
+ 1,
+ 2,
+ 3,
+ default,
+ };
+ int[] z = new int[2]
+ {
+ 1,
+ 2,
+ };
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForArrayTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForArrayTest.Xml.xml
new file mode 100644
index 00000000..441a7326
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForArrayTest.Xml.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ void
+ int[] x = new int[4]
+ {
+ 1,
+ 2,
+ 3,
+ 4,
+ };
+ int[] y = new int[4]
+ {
+ 1,
+ 2,
+ 3,
+ default,
+ };
+ int[] z = new int[2]
+ {
+ 1,
+ 2,
+ };
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForRecordDeclTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForRecordDeclTest.CSharp.cs
new file mode 100644
index 00000000..dbbad4f9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForRecordDeclTest.CSharp.cs
@@ -0,0 +1,37 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float x;
+
+ public float y;
+
+ public float z;
+
+ public float w;
+ }
+
+ public static partial class Methods
+ {
+ public static MyStruct MyFunction1()
+ {
+ return new MyStruct
+ {
+ x = 1.0f,
+ y = 2.0f,
+ z = 3.0f,
+ w = 4.0f,
+ };
+ }
+
+ public static MyStruct MyFunction2()
+ {
+ return new MyStruct
+ {
+ x = 1.0f,
+ y = 2.0f,
+ z = 3.0f,
+ };
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForRecordDeclTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForRecordDeclTest.Xml.xml
new file mode 100644
index 00000000..9d0602d9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/InitListForRecordDeclTest.Xml.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
+ MyStruct
+ return new MyStruct
+ {
+ x = 1.0f,
+ y = 2.0f,
+ z = 3.0f,
+ w = 4.0f,
+ };
+
+
+ MyStruct
+ return new MyStruct
+ {
+ x = 1.0f,
+ y = 2.0f,
+ z = 3.0f,
+ };
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/MemberTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/MemberTest.CSharp.cs
new file mode 100644
index 00000000..5648f3f4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/MemberTest.CSharp.cs
@@ -0,0 +1,20 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static int MyFunction1(MyStruct instance)
+ {
+ return instance.value;
+ }
+
+ public static int MyFunction2(MyStruct* instance)
+ {
+ return instance->value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/MemberTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/MemberTest.Xml.xml
new file mode 100644
index 00000000..a8432fcd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/MemberTest.Xml.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+ int
+
+
+
+
+ int
+
+ MyStruct
+
+ return instance.value;
+
+
+ int
+
+ MyStruct*
+
+ return instance->value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/RefToPtrTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/RefToPtrTest.CSharp.cs
new file mode 100644
index 00000000..ed5080a4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/RefToPtrTest.CSharp.cs
@@ -0,0 +1,15 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public static unsafe partial class Methods
+ {
+ public static bool MyFunction([NativeTypeName("const MyStruct &")] MyStruct* lhs, [NativeTypeName("const MyStruct &")] MyStruct* rhs)
+ {
+ return lhs->value == rhs->value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/RefToPtrTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/RefToPtrTest.Xml.xml
new file mode 100644
index 00000000..a9d3331c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/RefToPtrTest.Xml.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ int
+
+
+
+
+ bool
+
+ MyStruct*
+
+
+ MyStruct*
+
+ return lhs->value == rhs->value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_false.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_false.CSharp.cs
new file mode 100644
index 00000000..2f79bb94
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_false.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction()
+ {
+ return false;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_false.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_false.Xml.xml
new file mode 100644
index 00000000..d4f9a4aa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_false.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ bool
+ return false;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_true.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_true.CSharp.cs
new file mode 100644
index 00000000..13af7f5f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_true.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction()
+ {
+ return true;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_true.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_true.Xml.xml
new file mode 100644
index 00000000..4cb527fd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXBooleanLiteralTest_true.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ bool
+ return true;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXNullPtrTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXNullPtrTest.CSharp.cs
new file mode 100644
index 00000000..d45eaa35
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXNullPtrTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static void* MyFunction()
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXNullPtrTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXNullPtrTest.Xml.xml
new file mode 100644
index 00000000..68b582fb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnCXXNullPtrTest.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ void*
+ return null;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnEmptyTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnEmptyTest.CSharp.cs
new file mode 100644
index 00000000..d9932ae3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnEmptyTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static void MyFunction()
+ {
+ return;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnEmptyTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnEmptyTest.Xml.xml
new file mode 100644
index 00000000..3336bc32
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnEmptyTest.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ void
+ return;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_3_2E14.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_3_2E14.CSharp.cs
new file mode 100644
index 00000000..0fb58439
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_3_2E14.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static double MyFunction()
+ {
+ return 3.14;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_3_2E14.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_3_2E14.Xml.xml
new file mode 100644
index 00000000..6a49c02f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_3_2E14.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ double
+ return 3.14;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_5e_2D1.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_5e_2D1.CSharp.cs
new file mode 100644
index 00000000..b2de5cb2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_5e_2D1.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static double MyFunction()
+ {
+ return 5e-1;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_5e_2D1.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_5e_2D1.Xml.xml
new file mode 100644
index 00000000..ef9f1634
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralDoubleTest_5e_2D1.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ double
+ return 5e-1;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_3_2E14f.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_3_2E14f.CSharp.cs
new file mode 100644
index 00000000..db455ead
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_3_2E14f.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static float MyFunction()
+ {
+ return 3.14f;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_3_2E14f.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_3_2E14f.Xml.xml
new file mode 100644
index 00000000..8cf7ce22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_3_2E14f.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ float
+ return 3.14f;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_5e_2D1f.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_5e_2D1f.CSharp.cs
new file mode 100644
index 00000000..1b98eab9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_5e_2D1f.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static float MyFunction()
+ {
+ return 5e-1f;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_5e_2D1f.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_5e_2D1f.Xml.xml
new file mode 100644
index 00000000..faeff00a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnFloatingLiteralSingleTest_5e_2D1f.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ float
+ return 5e-1f;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnIntegerLiteralInt32Test.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnIntegerLiteralInt32Test.CSharp.cs
new file mode 100644
index 00000000..dc571a06
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnIntegerLiteralInt32Test.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction()
+ {
+ return -1;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnIntegerLiteralInt32Test.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnIntegerLiteralInt32Test.Xml.xml
new file mode 100644
index 00000000..76ceb89c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnIntegerLiteralInt32Test.Xml.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+ int
+ return -1;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnStructTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnStructTest.CSharp.cs
new file mode 100644
index 00000000..bb51113c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnStructTest.CSharp.cs
@@ -0,0 +1,21 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+ }
+
+ public static partial class Methods
+ {
+ public static MyStruct MyFunction()
+ {
+ MyStruct myStruct = new MyStruct();
+
+ return myStruct;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnStructTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnStructTest.Xml.xml
new file mode 100644
index 00000000..e2c85b7e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/ReturnStructTest.Xml.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
+ MyStruct
+ MyStruct myStruct = new MyStruct();
+
+ return myStruct;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchNonCompoundTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchNonCompoundTest.CSharp.cs
new file mode 100644
index 00000000..213265e2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchNonCompoundTest.CSharp.cs
@@ -0,0 +1,24 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ switch (value)
+ {
+ default:
+ {
+ return 0;
+ }
+ }
+
+ switch (value)
+ {
+ default:
+ {
+ return 0;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchNonCompoundTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchNonCompoundTest.Xml.xml
new file mode 100644
index 00000000..076dae80
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchNonCompoundTest.Xml.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+ int
+
+ int
+
+ switch (value)
+ {
+ default:
+ {
+ return 0;
+ }
+ }
+
+ switch (value)
+ {
+ default:
+ {
+ return 0;
+ }
+ }
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchTest.CSharp.cs
new file mode 100644
index 00000000..e5def936
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchTest.CSharp.cs
@@ -0,0 +1,16 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ switch (value)
+ {
+ default:
+ {
+ return 0;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchTest.Xml.xml
new file mode 100644
index 00000000..0acdee5c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/SwitchTest.Xml.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ int
+
+ int
+
+ switch (value)
+ {
+ default:
+ {
+ return 0;
+ }
+ }
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorAddrOfTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorAddrOfTest.CSharp.cs
new file mode 100644
index 00000000..95cc1940
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorAddrOfTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static int* MyFunction(int value)
+ {
+ return &value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorAddrOfTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorAddrOfTest.Xml.xml
new file mode 100644
index 00000000..0f4fadaa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorAddrOfTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int*
+
+ int
+
+ return &value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorDerefTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorDerefTest.CSharp.cs
new file mode 100644
index 00000000..db32f4eb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorDerefTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ public static int MyFunction(int* value)
+ {
+ return *value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorDerefTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorDerefTest.Xml.xml
new file mode 100644
index 00000000..c4af7b6f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorDerefTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int*
+
+ return *value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorLogicalNotTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorLogicalNotTest.CSharp.cs
new file mode 100644
index 00000000..30ce0438
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorLogicalNotTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static bool MyFunction(bool value)
+ {
+ return !value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorLogicalNotTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorLogicalNotTest.Xml.xml
new file mode 100644
index 00000000..aa1d0d9e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorLogicalNotTest.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ bool
+
+ bool
+
+ return !value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2B_2B.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2B_2B.CSharp.cs
new file mode 100644
index 00000000..4464bc18
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2B_2B.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ return value++;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2B_2B.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2B_2B.Xml.xml
new file mode 100644
index 00000000..30c8561e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2B_2B.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int
+
+ return value++;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2D_2D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2D_2D.CSharp.cs
new file mode 100644
index 00000000..513691d8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2D_2D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ return value--;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2D_2D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2D_2D.Xml.xml
new file mode 100644
index 00000000..2b060edb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPostfixTest__2D_2D.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int
+
+ return value--;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B.CSharp.cs
new file mode 100644
index 00000000..ed8beab6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ return +value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B.Xml.xml
new file mode 100644
index 00000000..e5f539ae
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int
+
+ return +value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B_2B.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B_2B.CSharp.cs
new file mode 100644
index 00000000..5401aa5c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B_2B.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ return ++value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B_2B.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B_2B.Xml.xml
new file mode 100644
index 00000000..829c87e0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2B_2B.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int
+
+ return ++value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D.CSharp.cs
new file mode 100644
index 00000000..6ba428f2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ return -value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D.Xml.xml
new file mode 100644
index 00000000..ef280ce3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int
+
+ return -value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D_2D.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D_2D.CSharp.cs
new file mode 100644
index 00000000..ce701c08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D_2D.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ return --value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D_2D.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D_2D.Xml.xml
new file mode 100644
index 00000000..4d04e391
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__2D_2D.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int
+
+ return --value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__7E.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__7E.CSharp.cs
new file mode 100644
index 00000000..08e3ad37
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__7E.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int value)
+ {
+ return ~value;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__7E.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__7E.Xml.xml
new file mode 100644
index 00000000..2052122e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/UnaryOperatorPrefixTest__7E.Xml.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ int
+
+ int
+
+ return ~value;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileNonCompoundTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileNonCompoundTest.CSharp.cs
new file mode 100644
index 00000000..6b312efe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileNonCompoundTest.CSharp.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int count)
+ {
+ int i = 0;
+
+ while (i < count)
+ {
+ i++;
+ }
+
+ return i;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileNonCompoundTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileNonCompoundTest.Xml.xml
new file mode 100644
index 00000000..5ab45ec1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileNonCompoundTest.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+ int
+
+ int i = 0;
+
+ while (i < count)
+ {
+ i++;
+ }
+
+ return i;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileTest.CSharp.cs
new file mode 100644
index 00000000..6b312efe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileTest.CSharp.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ public static int MyFunction(int count)
+ {
+ int i = 0;
+
+ while (i < count)
+ {
+ i++;
+ }
+
+ return i;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileTest.Xml.xml
new file mode 100644
index 00000000..5ab45ec1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationBodyImport/WhileTest.Xml.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+ int
+
+ int i = 0;
+
+ while (i < count)
+ {
+ i++;
+ }
+
+ return i;
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/ArrayParameterTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/ArrayParameterTest.CSharp.cs
new file mode 100644
index 00000000..cf956dad
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/ArrayParameterTest.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("const float[4]")] float* color);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/ArrayParameterTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/ArrayParameterTest.Xml.xml
new file mode 100644
index 00000000..124f6df9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/ArrayParameterTest.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ float*
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/BasicTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/BasicTest.CSharp.cs
new file mode 100644
index 00000000..e1bfab2e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/BasicTest.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/BasicTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/BasicTest.Xml.xml
new file mode 100644
index 00000000..1dfcf83d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/BasicTest.Xml.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..5aecb089
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Compatible.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("void (*)()")] IntPtr callback);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Default.cs
new file mode 100644
index 00000000..cae5558f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Default.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("void (*)()")] delegate* unmanaged[Cdecl] callback);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Latest.cs
new file mode 100644
index 00000000..cae5558f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Latest.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("void (*)()")] delegate* unmanaged[Cdecl] callback);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Preview.cs
new file mode 100644
index 00000000..cae5558f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.CSharp.Preview.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("void (*)()")] delegate* unmanaged[Cdecl] callback);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Compatible.xml
new file mode 100644
index 00000000..d5241fe5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Compatible.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ IntPtr
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Default.xml
new file mode 100644
index 00000000..1e150afd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Default.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Latest.xml
new file mode 100644
index 00000000..1e150afd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Latest.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Preview.xml
new file mode 100644
index 00000000..1e150afd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/FunctionPointerParameterTest.Xml.Preview.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/IntrinsicsTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/IntrinsicsTest.CSharp.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/IntrinsicsTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/IntrinsicsTest.Xml.xml
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..c8c39e8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN11MyNamespace10MyFunctionEv", ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..c8c39e8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Default.Unix.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN11MyNamespace10MyFunctionEv", ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..c8c39e8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN11MyNamespace10MyFunctionEv", ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..c8c39e8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "_ZN11MyNamespace10MyFunctionEv", ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.cs
new file mode 100644
index 00000000..4e9cf387
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?MyFunction@MyNamespace@@YAXXZ", ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..3d7417e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..3d7417e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Default.Unix.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..3d7417e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Latest.Unix.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..3d7417e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.Preview.Unix.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.xml
new file mode 100644
index 00000000..106886c3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NamespaceTest.Xml.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NoLibraryPathTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NoLibraryPathTest.CSharp.cs
new file mode 100644
index 00000000..110bdece
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NoLibraryPathTest.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NoLibraryPathTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NoLibraryPathTest.Xml.xml
new file mode 100644
index 00000000..3467d386
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/NoLibraryPathTest.Xml.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_double_5F1_2E0_5FFalse_5Fdouble_5F1_2E0.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_double_5F1_2E0_5FFalse_5Fdouble_5F1_2E0.CSharp.cs
new file mode 100644
index 00000000..4f6962a9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_double_5F1_2E0_5FFalse_5Fdouble_5F1_2E0.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(double value = 1.0);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_double_5F1_2E0_5FFalse_5Fdouble_5F1_2E0.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_double_5F1_2E0_5FFalse_5Fdouble_5F1_2E0.Xml.xml
new file mode 100644
index 00000000..434748da
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_double_5F1_2E0_5FFalse_5Fdouble_5F1_2E0.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ double
+
+ 1.0
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_float_5F6_2E0f_5FFalse_5Ffloat_5F6_2E0f.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_float_5F6_2E0f_5FFalse_5Ffloat_5F6_2E0f.CSharp.cs
new file mode 100644
index 00000000..8fee3301
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_float_5F6_2E0f_5FFalse_5Ffloat_5F6_2E0f.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(float value = 6.0f);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_float_5F6_2E0f_5FFalse_5Ffloat_5F6_2E0f.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_float_5F6_2E0f_5FFalse_5Ffloat_5F6_2E0f.Xml.xml
new file mode 100644
index 00000000..ad872907
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_float_5F6_2E0f_5FFalse_5Ffloat_5F6_2E0f.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ float
+
+ 6.0f
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_int_5F3_5FFalse_5Fint_5F3.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_int_5F3_5FFalse_5Fint_5F3.CSharp.cs
new file mode 100644
index 00000000..b457f236
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_int_5F3_5FFalse_5Fint_5F3.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(int value = 3);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_int_5F3_5FFalse_5Fint_5F3.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_int_5F3_5FFalse_5Fint_5F3.Xml.xml
new file mode 100644
index 00000000..e1479328
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_int_5F3_5FFalse_5Fint_5F3.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ int
+
+ 3
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_long_20long_5F4_5FTrue_5Flong_5F4.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_long_20long_5F4_5FTrue_5Flong_5F4.CSharp.cs
new file mode 100644
index 00000000..6733966f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_long_20long_5F4_5FTrue_5Flong_5F4.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("long long")] long value = 4);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_long_20long_5F4_5FTrue_5Flong_5F4.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_long_20long_5F4_5FTrue_5Flong_5F4.Xml.xml
new file mode 100644
index 00000000..a8289cca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_long_20long_5F4_5FTrue_5Flong_5F4.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ long
+
+ 4
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_short_5F2_5FFalse_5Fshort_5F2.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_short_5F2_5FFalse_5Fshort_5F2.CSharp.cs
new file mode 100644
index 00000000..481abfcb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_short_5F2_5FFalse_5Fshort_5F2.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(short value = 2);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_short_5F2_5FFalse_5Fshort_5F2.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_short_5F2_5FFalse_5Fshort_5F2.Xml.xml
new file mode 100644
index 00000000..d70108cd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_short_5F2_5FFalse_5Fshort_5F2.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ short
+
+ 2
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_signed_20char_5F5_5FTrue_5Fsbyte_5F5.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_signed_20char_5F5_5FTrue_5Fsbyte_5F5.CSharp.cs
new file mode 100644
index 00000000..e92ee043
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_signed_20char_5F5_5FTrue_5Fsbyte_5F5.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("signed char")] sbyte value = 5);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_signed_20char_5F5_5FTrue_5Fsbyte_5F5.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_signed_20char_5F5_5FTrue_5Fsbyte_5F5.Xml.xml
new file mode 100644
index 00000000..e1e939f4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_signed_20char_5F5_5FTrue_5Fsbyte_5F5.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ sbyte
+
+ 5
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20char_5F0_5FTrue_5Fbyte_5F0.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20char_5F0_5FTrue_5Fbyte_5F0.CSharp.cs
new file mode 100644
index 00000000..f776ee3f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20char_5F0_5FTrue_5Fbyte_5F0.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("unsigned char")] byte value = 0);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20char_5F0_5FTrue_5Fbyte_5F0.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20char_5F0_5FTrue_5Fbyte_5F0.Xml.xml
new file mode 100644
index 00000000..ded85895
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20char_5F0_5FTrue_5Fbyte_5F0.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ byte
+
+ 0
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20int_5F8_5FTrue_5Fuint_5F8.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20int_5F8_5FTrue_5Fuint_5F8.CSharp.cs
new file mode 100644
index 00000000..39fca763
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20int_5F8_5FTrue_5Fuint_5F8.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("unsigned int")] uint value = 8);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20int_5F8_5FTrue_5Fuint_5F8.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20int_5F8_5FTrue_5Fuint_5F8.Xml.xml
new file mode 100644
index 00000000..06e86e5b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20int_5F8_5FTrue_5Fuint_5F8.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ uint
+
+ 8
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20long_20long_5F9_5FTrue_5Fulong_5F9.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20long_20long_5F9_5FTrue_5Fulong_5F9.CSharp.cs
new file mode 100644
index 00000000..dd6bff3f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20long_20long_5F9_5FTrue_5Fulong_5F9.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("unsigned long long")] ulong value = 9);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20long_20long_5F9_5FTrue_5Fulong_5F9.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20long_20long_5F9_5FTrue_5Fulong_5F9.Xml.xml
new file mode 100644
index 00000000..a9dfb811
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20long_20long_5F9_5FTrue_5Fulong_5F9.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ ulong
+
+ 9
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F7_5FTrue_5Fushort_5F7.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F7_5FTrue_5Fushort_5F7.CSharp.cs
new file mode 100644
index 00000000..d00e0b33
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F7_5FTrue_5Fushort_5F7.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("unsigned short")] ushort value = 7);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F7_5FTrue_5Fushort_5F7.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F7_5FTrue_5Fushort_5F7.Xml.xml
new file mode 100644
index 00000000..5b2ed8b4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F7_5FTrue_5Fushort_5F7.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ ushort
+
+ 7
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F_27A_27_5FTrue_5Fushort_5F_28byte_29_28_27A_27_29.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F_27A_27_5FTrue_5Fushort_5F_28byte_29_28_27A_27_29.CSharp.cs
new file mode 100644
index 00000000..53d3d607
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F_27A_27_5FTrue_5Fushort_5F_28byte_29_28_27A_27_29.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("unsigned short")] ushort value = (byte)('A'));
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F_27A_27_5FTrue_5Fushort_5F_28byte_29_28_27A_27_29.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F_27A_27_5FTrue_5Fushort_5F_28byte_29_28_27A_27_29.Xml.xml
new file mode 100644
index 00000000..2c3638e4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterTest_unsigned_20short_5F_27A_27_5FTrue_5Fushort_5F_28byte_29_28_27A_27_29.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ ushort
+
+ (byte)('A')
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5F0_5Fvoid_2A_5Fnull.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5F0_5Fvoid_2A_5Fnull.CSharp.cs
new file mode 100644
index 00000000..e2ad5416
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5F0_5Fvoid_2A_5Fnull.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(void* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5F0_5Fvoid_2A_5Fnull.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5F0_5Fvoid_2A_5Fnull.Xml.xml
new file mode 100644
index 00000000..29a1fe64
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5F0_5Fvoid_2A_5Fnull.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ void*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5Fnullptr_5Fvoid_2A_5Fnull.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5Fnullptr_5Fvoid_2A_5Fnull.CSharp.cs
new file mode 100644
index 00000000..e2ad5416
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5Fnullptr_5Fvoid_2A_5Fnull.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(void* value = null);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5Fnullptr_5Fvoid_2A_5Fnull.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5Fnullptr_5Fvoid_2A_5Fnull.Xml.xml
new file mode 100644
index 00000000..29a1fe64
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/OptionalParameterUnsafeTest_void_20_2A_5Fnullptr_5Fvoid_2A_5Fnull.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ void
+
+ void*
+
+ null
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/SourceLocationTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/SourceLocationTest.CSharp.cs
new file mode 100644
index 00000000..411ac5af
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/SourceLocationTest.CSharp.cs
@@ -0,0 +1,11 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ [SourceLocation("ClangUnsavedFile.h", 1, 17)]
+ public static extern void MyFunction([SourceLocation("ClangUnsavedFile.h", 1, 34)] float value);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/SourceLocationTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/SourceLocationTest.Xml.xml
new file mode 100644
index 00000000..a634dd3c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/SourceLocationTest.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateMemberTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateMemberTest.CSharp.cs
new file mode 100644
index 00000000..2a6c1392
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateMemberTest.CSharp.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTemplate")]
+ public MyTemplate a;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateMemberTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateMemberTest.Xml.xml
new file mode 100644
index 00000000..167460dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateMemberTest.Xml.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ MyTemplate<IntPtr>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_bool_5FTrue_5Fbyte_5F.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_bool_5FTrue_5Fbyte_5F.CSharp.cs
new file mode 100644
index 00000000..e4d44b39
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_bool_5FTrue_5Fbyte_5F.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("MyTemplate")] MyTemplate myStruct);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_bool_5FTrue_5Fbyte_5F.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_bool_5FTrue_5Fbyte_5F.Xml.xml
new file mode 100644
index 00000000..d13558df
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_bool_5FTrue_5Fbyte_5F.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ MyTemplate<byte>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_float_20_2A_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_float_20_2A_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.CSharp.cs
new file mode 100644
index 00000000..525bd015
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_float_20_2A_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.CSharp.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("MyTemplate")] MyTemplate myStruct);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_float_20_2A_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_float_20_2A_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.Xml.xml
new file mode 100644
index 00000000..01eb189c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_float_20_2A_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ MyTemplate<IntPtr>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_int_5FFalse_5Fint_5F.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_int_5FFalse_5Fint_5F.CSharp.cs
new file mode 100644
index 00000000..15cde60a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_int_5FFalse_5Fint_5F.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(MyTemplate myStruct);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_int_5FFalse_5Fint_5F.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_int_5FFalse_5Fint_5F.Xml.xml
new file mode 100644
index 00000000..8624f9b4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_int_5FFalse_5Fint_5F.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ MyTemplate<int>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_void_20_28_2A_29_28int_29_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_void_20_28_2A_29_28int_29_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.CSharp.cs
new file mode 100644
index 00000000..a312e7e2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_void_20_28_2A_29_28int_29_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.CSharp.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction([NativeTypeName("MyTemplate")] MyTemplate myStruct);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_void_20_28_2A_29_28int_29_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_void_20_28_2A_29_28int_29_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.Xml.xml
new file mode 100644
index 00000000..01eb189c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/TemplateParameterTest_void_20_28_2A_29_28int_29_5FTrue_5FIntPtr_5Fusing_20System_3B_0A.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ void
+
+ MyTemplate<IntPtr>
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..012e52ec
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(int value, __arglist);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..012e52ec
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Default.Windows.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(int value, __arglist);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..012e52ec
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(int value, __arglist);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..012e52ec
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/VarargsTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction(int value, __arglist);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarOverrideTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarOverrideTest.CSharp.cs
new file mode 100644
index 00000000..92091a8d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarOverrideTest.CSharp.cs
@@ -0,0 +1,13 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", ExactSpelling = true)]
+ public static extern void MyFunction1(int value);
+
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)]
+ public static extern void MyFunction2(int value);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarOverrideTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarOverrideTest.Xml.xml
new file mode 100644
index 00000000..4c9c5dd5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarOverrideTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ void
+
+ int
+
+
+
+ void
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarTest.CSharp.cs
new file mode 100644
index 00000000..85f6e126
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarTest.CSharp.cs
@@ -0,0 +1,13 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", ExactSpelling = true)]
+ public static extern void MyFunction1(int value);
+
+ [DllImport("ClangSharpPInvokeGenerator", ExactSpelling = true)]
+ public static extern void MyFunction2(int value);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarTest.Xml.xml
new file mode 100644
index 00000000..fbb515ff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvStarTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ void
+
+ int
+
+
+
+ void
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvTest.CSharp.cs
new file mode 100644
index 00000000..77789cfe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvTest.CSharp.cs
@@ -0,0 +1,13 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", ExactSpelling = true)]
+ public static extern void MyFunction1(int value);
+
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction2(int value);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvTest.Xml.xml
new file mode 100644
index 00000000..66d23f21
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithCallConvTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ void
+
+ int
+
+
+
+ void
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathStarTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathStarTest.CSharp.cs
new file mode 100644
index 00000000..e1bfab2e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathStarTest.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathStarTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathStarTest.Xml.xml
new file mode 100644
index 00000000..1dfcf83d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathStarTest.Xml.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathTest.CSharp.cs
new file mode 100644
index 00000000..e1bfab2e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathTest.CSharp.cs
@@ -0,0 +1,10 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathTest.Xml.xml
new file mode 100644
index 00000000..1dfcf83d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithLibraryPathTest.Xml.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorStarTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorStarTest.CSharp.cs
new file mode 100644
index 00000000..72c1144d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorStarTest.CSharp.cs
@@ -0,0 +1,13 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = true)]
+ public static extern void MyFunction1(int value);
+
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = true)]
+ public static extern void MyFunction2(int value);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorStarTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorStarTest.Xml.xml
new file mode 100644
index 00000000..ee7e2b73
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorStarTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ void
+
+ int
+
+
+
+ void
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorTest.CSharp.cs
new file mode 100644
index 00000000..56de16d4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorTest.CSharp.cs
@@ -0,0 +1,13 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = true)]
+ public static extern void MyFunction1(int value);
+
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction2(int value);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorTest.Xml.xml
new file mode 100644
index 00000000..f25321b1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionDeclarationDllImport/WithSetLastErrorTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ void
+
+ int
+
+
+
+ void
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..283d4fce
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Compatible.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void Callback();
+
+ public partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public IntPtr _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Default.cs
new file mode 100644
index 00000000..ab439a0b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Default.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Latest.cs
new file mode 100644
index 00000000..ab439a0b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Latest.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Preview.cs
new file mode 100644
index 00000000..ab439a0b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.CSharp.Preview.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Compatible.xml
new file mode 100644
index 00000000..c7ca8ecc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Compatible.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ void
+
+
+
+ IntPtr
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Default.xml
new file mode 100644
index 00000000..fc11a560
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Default.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Latest.xml
new file mode 100644
index 00000000..fc11a560
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Latest.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Preview.xml
new file mode 100644
index 00000000..fc11a560
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/BasicTest.Xml.Preview.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..63fa8098
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Compatible.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void Callback();
+
+ public partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public IntPtr _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Default.cs
new file mode 100644
index 00000000..e80d15e3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Default.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public delegate* unmanaged[Stdcall] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Latest.cs
new file mode 100644
index 00000000..e80d15e3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Latest.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public delegate* unmanaged[Stdcall] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Preview.cs
new file mode 100644
index 00000000..e80d15e3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.CSharp.Preview.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback")]
+ public delegate* unmanaged[Stdcall] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Compatible.xml
new file mode 100644
index 00000000..e73a7226
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Compatible.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ void
+
+
+
+ IntPtr
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Default.xml
new file mode 100644
index 00000000..8d530d3e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Default.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Stdcall]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Latest.xml
new file mode 100644
index 00000000..8d530d3e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Latest.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Stdcall]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Preview.xml
new file mode 100644
index 00000000..8d530d3e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/CallconvTest.Xml.Preview.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Stdcall]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..0cd46b9d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Compatible.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void Callback();
+
+ public partial struct MyStruct
+ {
+ [NativeTypeName("Callback *")]
+ public IntPtr _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Default.cs
new file mode 100644
index 00000000..9182283e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Default.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback *")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Latest.cs
new file mode 100644
index 00000000..9182283e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Latest.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback *")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Preview.cs
new file mode 100644
index 00000000..9182283e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.CSharp.Preview.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("Callback *")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Compatible.xml
new file mode 100644
index 00000000..ff657d34
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Compatible.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ void
+
+
+
+ IntPtr
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Default.xml
new file mode 100644
index 00000000..3aaad9f6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Default.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Latest.xml
new file mode 100644
index 00000000..3aaad9f6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Latest.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Preview.xml
new file mode 100644
index 00000000..3aaad9f6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerDeclaration/PointerlessTypedefTest.Xml.Preview.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerRemap/RemappedFnptrTypedefFieldStaysIntPtrUnix.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerRemap/RemappedFnptrTypedefFieldStaysIntPtrUnix.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..adc2a0e2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerRemap/RemappedFnptrTypedefFieldStaysIntPtrUnix.CSharp.Compatible.Unix.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void PFoo(int param0);
+
+ public partial struct Callbacks
+ {
+ [NativeTypeName("ApiPFoo *")]
+ public IntPtr Foo;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerRemap/RemappedFnptrTypedefFieldStaysIntPtrWindows.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerRemap/RemappedFnptrTypedefFieldStaysIntPtrWindows.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..adc2a0e2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/FunctionPointerRemap/RemappedFnptrTypedefFieldStaysIntPtrWindows.CSharp.Compatible.Windows.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ public delegate void PFoo(int param0);
+
+ public partial struct Callbacks
+ {
+ [NativeTypeName("ApiPFoo *")]
+ public IntPtr Foo;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GlobalStructInitializer/NonConstGlobalTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GlobalStructInitializer/NonConstGlobalTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..91ad6a3f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GlobalStructInitializer/NonConstGlobalTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,18 @@
+namespace ClangSharp.Test
+{
+ public partial struct Point
+ {
+ public int x;
+
+ public int y;
+ }
+
+ public static partial class Methods
+ {
+ public static Point MyGlobalPoint = new Point
+ {
+ x = 10,
+ y = 20,
+ };
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClass.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClass.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..9051b364
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClass.CSharp.Latest.Windows.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct SRC_DATA
+ {
+ [NativeTypeName("const float *")]
+ public float* data_in;
+
+ [NativeTypeName("long")]
+ public int input_frames;
+ }
+
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+
+ /// Defines the type of a member as it was used in the native signature.
+ [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
+ [Conditional("DEBUG")]
+ internal sealed partial class NativeTypeNameAttribute : Attribute
+ {
+ private readonly string _name;
+
+ /// Initializes a new instance of the class.
+ /// The name of the type that was used in the native signature.
+ public NativeTypeNameAttribute(string name)
+ {
+ _name = name;
+ }
+
+ /// Gets the name of the type that was used in the native signature.
+ public string Name => _name;
+ }
+
+ /// Defines the annotation found in a native declaration.
+ [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
+ [Conditional("DEBUG")]
+ internal sealed partial class NativeAnnotationAttribute : Attribute
+ {
+ private readonly string _annotation;
+
+ /// Initializes a new instance of the class.
+ /// The annotation that was used in the native declaration.
+ public NativeAnnotationAttribute(string annotation)
+ {
+ _annotation = annotation;
+ }
+
+ /// Gets the annotation that was used in the native declaration.
+ public string Annotation => _annotation;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClassFileScoped.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClassFileScoped.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..8f6ba8d5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClassFileScoped.CSharp.Latest.Windows.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test;
+
+public unsafe partial struct SRC_DATA
+{
+ [NativeTypeName("const float *")]
+ public float* data_in;
+
+ [NativeTypeName("long")]
+ public int input_frames;
+}
+
+public static partial class Methods
+{
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+}
+
+/// Defines the type of a member as it was used in the native signature.
+[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
+[Conditional("DEBUG")]
+internal sealed partial class NativeTypeNameAttribute : Attribute
+{
+ private readonly string _name;
+
+ /// Initializes a new instance of the class.
+ /// The name of the type that was used in the native signature.
+ public NativeTypeNameAttribute(string name)
+ {
+ _name = name;
+ }
+
+ /// Gets the name of the type that was used in the native signature.
+ public string Name => _name;
+}
+
+/// Defines the annotation found in a native declaration.
+[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
+[Conditional("DEBUG")]
+internal sealed partial class NativeAnnotationAttribute : Attribute
+{
+ private readonly string _annotation;
+
+ /// Initializes a new instance of the class.
+ /// The annotation that was used in the native declaration.
+ public NativeAnnotationAttribute(string annotation)
+ {
+ _annotation = annotation;
+ }
+
+ /// Gets the annotation that was used in the native declaration.
+ public string Annotation => _annotation;
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedFileScopedNamespace.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedFileScopedNamespace.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..43ca195f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedFileScopedNamespace.CSharp.Latest.Windows.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Diagnostics;
+
+namespace ClangSharp.Test;
+
+public unsafe partial struct SRC_DATA
+{
+ [NativeTypeName("const float *")]
+ public float* data_in;
+
+ [NativeTypeName("long")]
+ public int input_frames;
+}
+
+/// Defines the type of a member as it was used in the native signature.
+[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
+[Conditional("DEBUG")]
+internal sealed partial class NativeTypeNameAttribute : Attribute
+{
+ private readonly string _name;
+
+ /// Initializes a new instance of the class.
+ /// The name of the type that was used in the native signature.
+ public NativeTypeNameAttribute(string name)
+ {
+ _name = name;
+ }
+
+ /// Gets the name of the type that was used in the native signature.
+ public string Name => _name;
+}
+
+/// Defines the annotation found in a native declaration.
+[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
+[Conditional("DEBUG")]
+internal sealed partial class NativeAnnotationAttribute : Attribute
+{
+ private readonly string _annotation;
+
+ /// Initializes a new instance of the class.
+ /// The annotation that was used in the native declaration.
+ public NativeAnnotationAttribute(string annotation)
+ {
+ _annotation = annotation;
+ }
+
+ /// Gets the annotation that was used in the native declaration.
+ public string Annotation => _annotation;
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedNamespace.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedNamespace.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..719c4991
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedNamespace.CSharp.Latest.Windows.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Diagnostics;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct SRC_DATA
+ {
+ [NativeTypeName("const float *")]
+ public float* data_in;
+
+ [NativeTypeName("long")]
+ public int input_frames;
+ }
+
+ /// Defines the type of a member as it was used in the native signature.
+ [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
+ [Conditional("DEBUG")]
+ internal sealed partial class NativeTypeNameAttribute : Attribute
+ {
+ private readonly string _name;
+
+ /// Initializes a new instance of the class.
+ /// The name of the type that was used in the native signature.
+ public NativeTypeNameAttribute(string name)
+ {
+ _name = name;
+ }
+
+ /// Gets the name of the type that was used in the native signature.
+ public string Name => _name;
+ }
+
+ /// Defines the annotation found in a native declaration.
+ [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
+ [Conditional("DEBUG")]
+ internal sealed partial class NativeAnnotationAttribute : Attribute
+ {
+ private readonly string _annotation;
+
+ /// Initializes a new instance of the class.
+ /// The annotation that was used in the native declaration.
+ public NativeAnnotationAttribute(string annotation)
+ {
+ _annotation = annotation;
+ }
+
+ /// Gets the annotation that was used in the native declaration.
+ public string Annotation => _annotation;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/DispatchesNonPrimaryBaseThroughSubobject.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/DispatchesNonPrimaryBaseThroughSubobject.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..ab67a951
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/DispatchesNonPrimaryBaseThroughSubobject.CSharp.Latest.Windows.cs
@@ -0,0 +1,42 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct Foo
+ {
+ public void** lpVtbl;
+
+ public void FooMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Foo*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ public unsafe partial struct Bar
+ {
+ public void** lpVtbl;
+
+ public void BarMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Bar*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct Baz : Foo, Bar")]
+ public unsafe partial struct Baz
+ {
+ public void** lpVtbl;
+
+ public Bar Base2;
+
+ public void FooMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Baz*)Unsafe.AsPointer(ref this));
+ }
+
+ public void BazMethod()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((Baz*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsFieldBearingPrimaryBaseAsSubobject.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsFieldBearingPrimaryBaseAsSubobject.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..2f695c1c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsFieldBearingPrimaryBaseAsSubobject.CSharp.Latest.Windows.cs
@@ -0,0 +1,34 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct Foo
+ {
+ public void** lpVtbl;
+
+ public int x;
+
+ public void A()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Foo*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ public unsafe partial struct Bar
+ {
+ public void** lpVtbl;
+
+ public void B()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Bar*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct Baz : Foo, Bar")]
+ public partial struct Baz
+ {
+ public Foo Base1;
+
+ public Bar Base2;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsSecondaryBaseAsSubobject.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsSecondaryBaseAsSubobject.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..6a6f024e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsSecondaryBaseAsSubobject.CSharp.Latest.Windows.cs
@@ -0,0 +1,37 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct Foo
+ {
+ public void** lpVtbl;
+
+ public void Dispose()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Foo*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ public unsafe partial struct Bar
+ {
+ public void** lpVtbl;
+
+ public void Dispose()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Bar*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct Baz : Foo, Bar")]
+ public unsafe partial struct Baz
+ {
+ public void** lpVtbl;
+
+ public Bar Base2;
+
+ public void Dispose()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((Baz*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsSecondaryBaseAsSubobjectWithExplicitVtbls.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsSecondaryBaseAsSubobjectWithExplicitVtbls.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..e719829e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/EmitsSecondaryBaseAsSubobjectWithExplicitVtbls.CSharp.Latest.Windows.cs
@@ -0,0 +1,55 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct Foo
+ {
+ public Vtbl* lpVtbl;
+
+ public void Dispose()
+ {
+ lpVtbl->Dispose((Foo*)Unsafe.AsPointer(ref this));
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("void () noexcept")]
+ public delegate* unmanaged[Thiscall] Dispose;
+ }
+ }
+
+ public unsafe partial struct Bar
+ {
+ public Vtbl* lpVtbl;
+
+ public void Dispose()
+ {
+ lpVtbl->Dispose((Bar*)Unsafe.AsPointer(ref this));
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("void () noexcept")]
+ public delegate* unmanaged[Thiscall] Dispose;
+ }
+ }
+
+ [NativeTypeName("struct Baz : Foo, Bar")]
+ public unsafe partial struct Baz
+ {
+ public Vtbl* lpVtbl;
+
+ public Bar Base2;
+
+ public void Dispose()
+ {
+ lpVtbl->Dispose((Baz*)Unsafe.AsPointer(ref this));
+ }
+
+ public partial struct Vtbl
+ {
+ [NativeTypeName("void () noexcept")]
+ public delegate* unmanaged[Thiscall] Dispose;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/FallsBackToFlattenedVtblForNestedMultipleInheritance.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/FallsBackToFlattenedVtblForNestedMultipleInheritance.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..fe174f66
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/FallsBackToFlattenedVtblForNestedMultipleInheritance.CSharp.Latest.Windows.cs
@@ -0,0 +1,68 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct A
+ {
+ public void** lpVtbl;
+
+ public void a()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((A*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ public unsafe partial struct B
+ {
+ public void** lpVtbl;
+
+ public void b()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((B*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct C : A, B")]
+ public unsafe partial struct C
+ {
+ public void** lpVtbl;
+
+ public B Base2;
+
+ public void a()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((C*)Unsafe.AsPointer(ref this));
+ }
+
+ public void c()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((C*)Unsafe.AsPointer(ref this));
+ }
+ }
+
+ [NativeTypeName("struct D : C")]
+ public unsafe partial struct D
+ {
+ public void** lpVtbl;
+
+ public void a()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((D*)Unsafe.AsPointer(ref this));
+ }
+
+ public void b()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[0]))((D*)Unsafe.AsPointer(ref this));
+ }
+
+ public void c()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[1]))((D*)Unsafe.AsPointer(ref this));
+ }
+
+ public void d()
+ {
+ ((delegate* unmanaged[Thiscall])(lpVtbl[2]))((D*)Unsafe.AsPointer(ref this));
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/InheritsPrimaryBaseMarkerInterfaceOnly.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/InheritsPrimaryBaseMarkerInterfaceOnly.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..8167169b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/MultipleBaseVtblSubobject/InheritsPrimaryBaseMarkerInterfaceOnly.CSharp.Latest.Windows.cs
@@ -0,0 +1,81 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct Foo : Foo.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public void FooMethod()
+ {
+ lpVtbl->FooMethod((Foo*)Unsafe.AsPointer(ref this));
+ }
+
+ public interface Interface
+ {
+ void FooMethod();
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("void ()")]
+ public delegate* unmanaged[Thiscall] FooMethod;
+ }
+ }
+
+ public unsafe partial struct Bar : Bar.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public void BarMethod()
+ {
+ lpVtbl->BarMethod((Bar*)Unsafe.AsPointer(ref this));
+ }
+
+ public interface Interface
+ {
+ void BarMethod();
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("void ()")]
+ public delegate* unmanaged[Thiscall] BarMethod;
+ }
+ }
+
+ [NativeTypeName("struct Baz : Foo, Bar")]
+ public unsafe partial struct Baz : Baz.Interface
+ {
+ public Vtbl* lpVtbl;
+
+ public Bar Base2;
+
+ public void FooMethod()
+ {
+ lpVtbl->FooMethod((Baz*)Unsafe.AsPointer(ref this));
+ }
+
+ public void BazMethod()
+ {
+ lpVtbl->BazMethod((Baz*)Unsafe.AsPointer(ref this));
+ }
+
+ public interface Interface : Foo.Interface
+ {
+ void BazMethod();
+ }
+
+ public partial struct Vtbl
+ where TSelf : unmanaged, Interface
+ {
+ [NativeTypeName("void ()")]
+ public delegate* unmanaged[Thiscall] FooMethod;
+
+ [NativeTypeName("void ()")]
+ public delegate* unmanaged[Thiscall] BazMethod;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/NestedTypeReference/NestedTypeIsQualified.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/NestedTypeReference/NestedTypeIsQualified.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..b922754f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/NestedTypeReference/NestedTypeIsQualified.CSharp.Latest.Windows.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public partial struct A
+ {
+
+ public partial struct Inner
+ {
+ public int value;
+ }
+ }
+
+ public partial struct B
+ {
+ [NativeTypeName("A::Inner")]
+ public A.Inner inner;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/NullPtrMacroBinding/NullPtrMacroTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/NullPtrMacroBinding/NullPtrMacroTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..53ce4678
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/NullPtrMacroBinding/NullPtrMacroTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public static unsafe partial class Methods
+ {
+ [NativeTypeName("#define MY_NULL_HANDLE nullptr")]
+ public static readonly void* MY_NULL_HANDLE = null;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/Options/WithAttributes.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/Options/WithAttributes.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..2fa00c8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/Options/WithAttributes.CSharp.Latest.Windows.cs
@@ -0,0 +1,22 @@
+namespace ClangSharp.Test
+{
+ [A]
+ public partial struct StructA
+ {
+ }
+
+ [B]
+ public partial struct StructB
+ {
+ }
+
+ [Star]
+ public partial struct StructC
+ {
+ }
+
+ [Star]
+ public partial struct StructD
+ {
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/Options/WithUsings.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/Options/WithUsings.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..7b282d5c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/Options/WithUsings.CSharp.Latest.Windows.cs
@@ -0,0 +1,24 @@
+using ForStar;
+using ForStructA1;
+using ForStructA2;
+using ForStructBWithDoubleColon;
+using ForStructCWithDot;
+
+namespace ClangSharp.Test
+{
+ public partial struct StructA
+ {
+ }
+
+ public partial struct StructB
+ {
+ }
+
+ public partial struct StructC
+ {
+ }
+
+ public partial struct StructD
+ {
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/SalFieldAttribute/FieldSalAnnotationGeneratesCppAttributeList.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/SalFieldAttribute/FieldSalAnnotationGeneratesCppAttributeList.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..d1e5a404
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/SalFieldAttribute/FieldSalAnnotationGeneratesCppAttributeList.CSharp.Latest.Windows.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public int count;
+
+ [CppAttributeList("_Field_size_full_(count)")]
+ [NativeAnnotation("_Field_size_full_(count)")]
+ public int* data;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StripEnumMemberReference/SiblingReferencesAreStripped.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StripEnumMemberReference/SiblingReferencesAreStripped.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..2f494c42
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StripEnumMemberReference/SiblingReferencesAreStripped.CSharp.Latest.Windows.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public enum WGPUInstanceBackend
+ {
+ Vulkan = 1 << 0,
+ GL = 1 << 1,
+ Metal = 1 << 2,
+ Primary = Vulkan | Metal,
+ Secondary = GL,
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Compatible.cs
new file mode 100644
index 00000000..cbab4c2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Compatible.cs
@@ -0,0 +1,49 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [NativeTypeName("struct (anonymous struct at ClangUnsavedFile.h:4:5)[2]")]
+ public _MyArray_e__FixedBuffer MyArray;
+
+ public ref int First
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->First;
+ }
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int First;
+ }
+
+ public partial struct _MyArray_e__Struct
+ {
+ public int Second;
+ }
+
+ public partial struct _MyArray_e__FixedBuffer
+ {
+ public _MyArray_e__Struct e0;
+ public _MyArray_e__Struct e1;
+
+ public unsafe ref _MyArray_e__Struct this[int index]
+ {
+ get
+ {
+ fixed (_MyArray_e__Struct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Default.cs
new file mode 100644
index 00000000..ff857c9f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Default.cs
@@ -0,0 +1,39 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [NativeTypeName("struct (anonymous struct at ClangUnsavedFile.h:4:5)[2]")]
+ public _MyArray_e__FixedBuffer MyArray;
+
+ [UnscopedRef]
+ public ref int First
+ {
+ get
+ {
+ return ref Anonymous.First;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int First;
+ }
+
+ public partial struct _MyArray_e__Struct
+ {
+ public int Second;
+ }
+
+ [InlineArray(2)]
+ public partial struct _MyArray_e__FixedBuffer
+ {
+ public _MyArray_e__Struct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Latest.cs
new file mode 100644
index 00000000..ff857c9f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Latest.cs
@@ -0,0 +1,39 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [NativeTypeName("struct (anonymous struct at ClangUnsavedFile.h:4:5)[2]")]
+ public _MyArray_e__FixedBuffer MyArray;
+
+ [UnscopedRef]
+ public ref int First
+ {
+ get
+ {
+ return ref Anonymous.First;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int First;
+ }
+
+ public partial struct _MyArray_e__Struct
+ {
+ public int Second;
+ }
+
+ [InlineArray(2)]
+ public partial struct _MyArray_e__FixedBuffer
+ {
+ public _MyArray_e__Struct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Preview.cs
new file mode 100644
index 00000000..ff857c9f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.CSharp.Preview.cs
@@ -0,0 +1,39 @@
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [NativeTypeName("struct (anonymous struct at ClangUnsavedFile.h:4:5)[2]")]
+ public _MyArray_e__FixedBuffer MyArray;
+
+ [UnscopedRef]
+ public ref int First
+ {
+ get
+ {
+ return ref Anonymous.First;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int First;
+ }
+
+ public partial struct _MyArray_e__Struct
+ {
+ public int Second;
+ }
+
+ [InlineArray(2)]
+ public partial struct _MyArray_e__FixedBuffer
+ {
+ public _MyArray_e__Struct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Compatible.xml
new file mode 100644
index 00000000..db255f8c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Compatible.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ _MyArray_e__Struct
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->First;
+ }
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+
+ _MyArray_e__Struct
+
+
+ _MyArray_e__Struct
+
+
+ ref _MyArray_e__Struct
+
+ int
+
+
+ fixed (_MyArray_e__Struct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Default.xml
new file mode 100644
index 00000000..4ee4cdc8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Default.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ _MyArray_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.First;
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+ InlineArray(2)
+
+ _MyArray_e__Struct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Latest.xml
new file mode 100644
index 00000000..4ee4cdc8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Latest.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ _MyArray_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.First;
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+ InlineArray(2)
+
+ _MyArray_e__Struct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Preview.xml
new file mode 100644
index 00000000..4ee4cdc8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/AnonStructAndAnonStructArray.Xml.Preview.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ _MyArray_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.First;
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+ InlineArray(2)
+
+ _MyArray_e__Struct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_double_5Fdouble.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_double_5Fdouble.CSharp.cs
new file mode 100644
index 00000000..5ae4f8fe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_double_5Fdouble.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_double_5Fdouble.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_double_5Fdouble.Xml.xml
new file mode 100644
index 00000000..5077cd83
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_double_5Fdouble.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_float_5Ffloat.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_float_5Ffloat.CSharp.cs
new file mode 100644
index 00000000..af54b381
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_float_5Ffloat.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float r;
+
+ public float g;
+
+ public float b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_float_5Ffloat.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_float_5Ffloat.Xml.xml
new file mode 100644
index 00000000..374ff19a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_float_5Ffloat.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..30d6c633
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_int_5Fint.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int r;
+
+ public int g;
+
+ public int b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_int_5Fint.Xml.xml
new file mode 100644
index 00000000..27257476
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_int_5Fint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..eb6aff08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_short_5Fshort.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short r;
+
+ public short g;
+
+ public short b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..bbd27e31
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTestInCMode_short_5Fshort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_double_5Fdouble.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_double_5Fdouble.CSharp.cs
new file mode 100644
index 00000000..5ae4f8fe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_double_5Fdouble.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_double_5Fdouble.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_double_5Fdouble.Xml.xml
new file mode 100644
index 00000000..5077cd83
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_double_5Fdouble.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_float_5Ffloat.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_float_5Ffloat.CSharp.cs
new file mode 100644
index 00000000..af54b381
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_float_5Ffloat.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float r;
+
+ public float g;
+
+ public float b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_float_5Ffloat.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_float_5Ffloat.Xml.xml
new file mode 100644
index 00000000..374ff19a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_float_5Ffloat.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..30d6c633
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_int_5Fint.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int r;
+
+ public int g;
+
+ public int b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_int_5Fint.Xml.xml
new file mode 100644
index 00000000..27257476
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_int_5Fint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..eb6aff08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_short_5Fshort.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short r;
+
+ public short g;
+
+ public short b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..bbd27e31
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicTest_short_5Fshort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..2459a799
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("bool")]
+ public byte r;
+
+ [NativeTypeName("bool")]
+ public byte g;
+
+ [NativeTypeName("bool")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
new file mode 100644
index 00000000..2efd5005
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
new file mode 100644
index 00000000..b7fe72ca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long")]
+ public long r;
+
+ [NativeTypeName("long long")]
+ public long g;
+
+ [NativeTypeName("long long")]
+ public long b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
new file mode 100644
index 00000000..510adc82
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ long
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
new file mode 100644
index 00000000..76c52d3c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte r;
+
+ [NativeTypeName("signed char")]
+ public sbyte g;
+
+ [NativeTypeName("signed char")]
+ public sbyte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
new file mode 100644
index 00000000..ef4a07bf
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..efea8ec7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte r;
+
+ [NativeTypeName("unsigned char")]
+ public byte g;
+
+ [NativeTypeName("unsigned char")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
new file mode 100644
index 00000000..9dbe4132
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
new file mode 100644
index 00000000..6bced97f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint r;
+
+ [NativeTypeName("unsigned int")]
+ public uint g;
+
+ [NativeTypeName("unsigned int")]
+ public uint b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
new file mode 100644
index 00000000..0e7bdb22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
new file mode 100644
index 00000000..4b6da458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong r;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong g;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
new file mode 100644
index 00000000..e8cfdc96
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
new file mode 100644
index 00000000..91e4bec0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort r;
+
+ [NativeTypeName("unsigned short")]
+ public ushort g;
+
+ [NativeTypeName("unsigned short")]
+ public ushort b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
new file mode 100644
index 00000000..207d533d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..a8033504
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,177 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..52382789
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,181 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..fc22731b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Default.Unix.cs
@@ -0,0 +1,177 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..358bba3a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Default.Windows.cs
@@ -0,0 +1,181 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..fc22731b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,177 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..358bba3a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,181 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..fc22731b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,177 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..358bba3a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,181 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..e262a062
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..e2c314cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..e262a062
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Default.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..e2c314cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Default.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..e262a062
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Latest.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..e2c314cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Latest.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..e262a062
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Preview.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..e2c314cb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldTest.Xml.Preview.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..f4f0ba82
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,188 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ [NativeBitfield("o8_b0_1", offset: 22, length: 1)]
+ [NativeBitfield("o12_b0_1", offset: 23, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 24, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..19f379ac
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,192 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [NativeBitfield("o12_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 1, length: 1)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..7f116697
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Default.Unix.cs
@@ -0,0 +1,188 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ [NativeBitfield("o8_b0_1", offset: 22, length: 1)]
+ [NativeBitfield("o12_b0_1", offset: 23, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 24, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..1efd47ae
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Default.Windows.cs
@@ -0,0 +1,192 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [NativeBitfield("o12_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 1, length: 1)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..7f116697
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,188 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ [NativeBitfield("o8_b0_1", offset: 22, length: 1)]
+ [NativeBitfield("o12_b0_1", offset: 23, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 24, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..1efd47ae
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,192 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [NativeBitfield("o12_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 1, length: 1)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..7f116697
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,188 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ [NativeBitfield("o8_b0_1", offset: 22, length: 1)]
+ [NativeBitfield("o12_b0_1", offset: 23, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 24, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..1efd47ae
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,192 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1
+ {
+ [NativeBitfield("o0_b0_24", offset: 0, length: 24)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [NativeBitfield("o4_b0_16", offset: 0, length: 16)]
+ [NativeBitfield("o4_b16_3", offset: 16, length: 3)]
+ [NativeBitfield("o4_b19_3", offset: 19, length: 3)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [NativeBitfield("o12_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o12_b1_1", offset: 1, length: 1)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ public partial struct MyStruct2
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ public int x;
+
+ [NativeBitfield("o8_b0_1", offset: 0, length: 1)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ public partial struct MyStruct3
+ {
+ [NativeBitfield("o0_b0_1", offset: 0, length: 1)]
+ [NativeBitfield("o0_b1_1", offset: 1, length: 1)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..683d5071
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ NativeBitfield("o8_b0_1", offset: 22, length: 1)
+ NativeBitfield("o12_b0_1", offset: 23, length: 1)
+ NativeBitfield("o12_b1_1", offset: 24, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..dceb05b7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,156 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ NativeBitfield("o12_b0_1", offset: 0, length: 1)
+ NativeBitfield("o12_b1_1", offset: 1, length: 1)
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..683d5071
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Default.Unix.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ NativeBitfield("o8_b0_1", offset: 22, length: 1)
+ NativeBitfield("o12_b0_1", offset: 23, length: 1)
+ NativeBitfield("o12_b1_1", offset: 24, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..dceb05b7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Default.Windows.xml
@@ -0,0 +1,156 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ NativeBitfield("o12_b0_1", offset: 0, length: 1)
+ NativeBitfield("o12_b1_1", offset: 1, length: 1)
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..683d5071
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Latest.Unix.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ NativeBitfield("o8_b0_1", offset: 22, length: 1)
+ NativeBitfield("o12_b0_1", offset: 23, length: 1)
+ NativeBitfield("o12_b1_1", offset: 24, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..dceb05b7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Latest.Windows.xml
@@ -0,0 +1,156 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ NativeBitfield("o12_b0_1", offset: 0, length: 1)
+ NativeBitfield("o12_b1_1", offset: 1, length: 1)
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..683d5071
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Preview.Unix.xml
@@ -0,0 +1,150 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ NativeBitfield("o8_b0_1", offset: 22, length: 1)
+ NativeBitfield("o12_b0_1", offset: 23, length: 1)
+ NativeBitfield("o12_b1_1", offset: 24, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..dceb05b7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/BitfieldWithNativeBitfieldAttributeTest.Xml.Preview.Windows.xml
@@ -0,0 +1,156 @@
+
+
+
+
+
+ NativeBitfield("o0_b0_24", offset: 0, length: 24)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ NativeBitfield("o4_b0_16", offset: 0, length: 16)
+ NativeBitfield("o4_b16_3", offset: 16, length: 3)
+ NativeBitfield("o4_b19_3", offset: 19, length: 3)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ NativeBitfield("o12_b0_1", offset: 0, length: 1)
+ NativeBitfield("o12_b1_1", offset: 1, length: 1)
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ NativeBitfield("o8_b0_1", offset: 0, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ NativeBitfield("o0_b0_1", offset: 0, length: 1)
+ NativeBitfield("o0_b1_1", offset: 1, length: 1)
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..19d8a073
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Compatible.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("decltype(&MyFunction)")]
+ public IntPtr _callback;
+ }
+
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Default.cs
new file mode 100644
index 00000000..bf5296e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("decltype(&MyFunction)")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Latest.cs
new file mode 100644
index 00000000..bf5296e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("decltype(&MyFunction)")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Preview.cs
new file mode 100644
index 00000000..bf5296e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("decltype(&MyFunction)")]
+ public delegate* unmanaged[Cdecl] _callback;
+ }
+
+ public static partial class Methods
+ {
+ [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
+ public static extern void MyFunction();
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Compatible.xml
new file mode 100644
index 00000000..dc4426bb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Compatible.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ IntPtr
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Default.xml
new file mode 100644
index 00000000..c01c221f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Default.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Latest.xml
new file mode 100644
index 00000000..c01c221f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Latest.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Preview.xml
new file mode 100644
index 00000000..c01c221f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeclTypeTest.Xml.Preview.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ delegate* unmanaged[Cdecl]<void>
+
+
+
+
+ void
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Compatible.cs
new file mode 100644
index 00000000..ed141de7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Compatible.cs
@@ -0,0 +1,55 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref int Value1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous2_e__Struct* pField = &Anonymous.Anonymous1.Anonymous2)
+ {
+ return ref pField->Value1;
+ }
+ }
+ }
+
+ public ref int Value2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous3_e__Struct* pField = &Anonymous.Anonymous1.Anonymous3)
+ {
+ return ref pField->Value2;
+ }
+ }
+ }
+
+ public unsafe partial struct _Anonymous_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C14")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public unsafe partial struct _Anonymous1_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C9")]
+ public _Anonymous2_e__Struct Anonymous2;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L5_C9")]
+ public _Anonymous3_e__Struct Anonymous3;
+
+ public partial struct _Anonymous2_e__Struct
+ {
+ public int Value1;
+ }
+
+ public partial struct _Anonymous3_e__Struct
+ {
+ public int Value2;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Default.cs
new file mode 100644
index 00000000..8d02c608
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Default.cs
@@ -0,0 +1,53 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int Value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous2.Value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int Value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous3.Value2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C14")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C9")]
+ public _Anonymous2_e__Struct Anonymous2;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L5_C9")]
+ public _Anonymous3_e__Struct Anonymous3;
+
+ public partial struct _Anonymous2_e__Struct
+ {
+ public int Value1;
+ }
+
+ public partial struct _Anonymous3_e__Struct
+ {
+ public int Value2;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Latest.cs
new file mode 100644
index 00000000..8d02c608
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Latest.cs
@@ -0,0 +1,53 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int Value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous2.Value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int Value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous3.Value2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C14")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C9")]
+ public _Anonymous2_e__Struct Anonymous2;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L5_C9")]
+ public _Anonymous3_e__Struct Anonymous3;
+
+ public partial struct _Anonymous2_e__Struct
+ {
+ public int Value1;
+ }
+
+ public partial struct _Anonymous3_e__Struct
+ {
+ public int Value2;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Preview.cs
new file mode 100644
index 00000000..8d02c608
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.CSharp.Preview.cs
@@ -0,0 +1,53 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct _MyStruct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int Value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous2.Value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int Value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous3.Value2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L3_C14")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C9")]
+ public _Anonymous2_e__Struct Anonymous2;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L5_C9")]
+ public _Anonymous3_e__Struct Anonymous3;
+
+ public partial struct _Anonymous2_e__Struct
+ {
+ public int Value1;
+ }
+
+ public partial struct _Anonymous3_e__Struct
+ {
+ public int Value2;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Compatible.xml
new file mode 100644
index 00000000..53112226
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Compatible.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous2_e__Struct* pField = &Anonymous.Anonymous1.Anonymous2)
+ {
+ return ref pField->Value1;
+ }
+
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous3_e__Struct* pField = &Anonymous.Anonymous1.Anonymous3)
+ {
+ return ref pField->Value2;
+ }
+
+
+
+
+ _Anonymous1_e__Struct
+
+
+
+ _Anonymous2_e__Struct
+
+
+ _Anonymous3_e__Struct
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Default.xml
new file mode 100644
index 00000000..9f13feb6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Default.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous2.Value1;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous3.Value2;
+
+
+
+
+ _Anonymous1_e__Struct
+
+
+
+ _Anonymous2_e__Struct
+
+
+ _Anonymous3_e__Struct
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Latest.xml
new file mode 100644
index 00000000..9f13feb6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Latest.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous2.Value1;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous3.Value2;
+
+
+
+
+ _Anonymous1_e__Struct
+
+
+
+ _Anonymous2_e__Struct
+
+
+ _Anonymous3_e__Struct
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Preview.xml
new file mode 100644
index 00000000..9f13feb6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/DeeplyNestedAnonStructs.Xml.Preview.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous2.Value1;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous3.Value2;
+
+
+
+
+ _Anonymous1_e__Struct
+
+
+
+ _Anonymous2_e__Struct
+
+
+ _Anonymous3_e__Struct
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/ExcludeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/ExcludeTest.CSharp.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/ExcludeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/ExcludeTest.Xml.xml
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..73670d4f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,63 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ public MyStruct e1_0_0_0;
+
+ public MyStruct e0_0_1_0;
+ public MyStruct e1_0_1_0;
+
+ public MyStruct e0_0_2_0;
+ public MyStruct e1_0_2_0;
+
+ public MyStruct e0_0_0_1;
+ public MyStruct e1_0_0_1;
+
+ public MyStruct e0_0_1_1;
+ public MyStruct e1_0_1_1;
+
+ public MyStruct e0_0_2_1;
+ public MyStruct e1_0_2_1;
+
+ public MyStruct e0_0_0_2;
+ public MyStruct e1_0_0_2;
+
+ public MyStruct e0_0_1_2;
+ public MyStruct e1_0_1_2;
+
+ public MyStruct e0_0_2_2;
+ public MyStruct e1_0_2_2;
+
+ public MyStruct e0_0_0_3;
+ public MyStruct e1_0_0_3;
+
+ public MyStruct e0_0_1_3;
+ public MyStruct e1_0_1_3;
+
+ public MyStruct e0_0_2_3;
+ public MyStruct e1_0_2_3;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..0cadd4e3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..0cadd4e3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..0cadd4e3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..8d6c9664
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..edd1a3dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..edd1a3dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..edd1a3dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..589ea7f0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,63 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ public MyStruct e1_0_0_0;
+
+ public MyStruct e0_0_1_0;
+ public MyStruct e1_0_1_0;
+
+ public MyStruct e0_0_2_0;
+ public MyStruct e1_0_2_0;
+
+ public MyStruct e0_0_0_1;
+ public MyStruct e1_0_0_1;
+
+ public MyStruct e0_0_1_1;
+ public MyStruct e1_0_1_1;
+
+ public MyStruct e0_0_2_1;
+ public MyStruct e1_0_2_1;
+
+ public MyStruct e0_0_0_2;
+ public MyStruct e1_0_0_2;
+
+ public MyStruct e0_0_1_2;
+ public MyStruct e1_0_1_2;
+
+ public MyStruct e0_0_2_2;
+ public MyStruct e1_0_2_2;
+
+ public MyStruct e0_0_0_3;
+ public MyStruct e1_0_0_3;
+
+ public MyStruct e0_0_1_3;
+ public MyStruct e1_0_1_3;
+
+ public MyStruct e0_0_2_3;
+ public MyStruct e1_0_2_3;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..e8ca9097
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..e8ca9097
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..e8ca9097
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..97260c53
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..4ab86ff3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..4ab86ff3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..4ab86ff3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..7b4d3408
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,63 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ public MyStruct e1_0_0_0;
+
+ public MyStruct e0_0_1_0;
+ public MyStruct e1_0_1_0;
+
+ public MyStruct e0_0_2_0;
+ public MyStruct e1_0_2_0;
+
+ public MyStruct e0_0_0_1;
+ public MyStruct e1_0_0_1;
+
+ public MyStruct e0_0_1_1;
+ public MyStruct e1_0_1_1;
+
+ public MyStruct e0_0_2_1;
+ public MyStruct e1_0_2_1;
+
+ public MyStruct e0_0_0_2;
+ public MyStruct e1_0_0_2;
+
+ public MyStruct e0_0_1_2;
+ public MyStruct e1_0_1_2;
+
+ public MyStruct e0_0_2_2;
+ public MyStruct e1_0_2_2;
+
+ public MyStruct e0_0_0_3;
+ public MyStruct e1_0_0_3;
+
+ public MyStruct e0_0_1_3;
+ public MyStruct e1_0_1_3;
+
+ public MyStruct e0_0_2_3;
+ public MyStruct e1_0_2_3;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..d3a731c1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..d3a731c1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..d3a731c1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..19707ab0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..9a97ac1f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..9a97ac1f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..9a97ac1f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..120dc040
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,63 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ public MyStruct e1_0_0_0;
+
+ public MyStruct e0_0_1_0;
+ public MyStruct e1_0_1_0;
+
+ public MyStruct e0_0_2_0;
+ public MyStruct e1_0_2_0;
+
+ public MyStruct e0_0_0_1;
+ public MyStruct e1_0_0_1;
+
+ public MyStruct e0_0_1_1;
+ public MyStruct e1_0_1_1;
+
+ public MyStruct e0_0_2_1;
+ public MyStruct e1_0_2_1;
+
+ public MyStruct e0_0_0_2;
+ public MyStruct e1_0_0_2;
+
+ public MyStruct e0_0_1_2;
+ public MyStruct e1_0_1_2;
+
+ public MyStruct e0_0_2_2;
+ public MyStruct e1_0_2_2;
+
+ public MyStruct e0_0_0_3;
+ public MyStruct e1_0_0_3;
+
+ public MyStruct e0_0_1_3;
+ public MyStruct e1_0_1_3;
+
+ public MyStruct e0_0_2_3;
+ public MyStruct e1_0_2_3;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..9391a32c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..9391a32c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..9391a32c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..a2ec9330
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..49d01557
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..49d01557
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..49d01557
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..0f008d07
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..5bcd4a72
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..5bcd4a72
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..5bcd4a72
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..4b11aff9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..3159b1d4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..3159b1d4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..3159b1d4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..c39451f5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..081c18c5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..081c18c5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..081c18c5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..c5769c37
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..8124d140
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..8124d140
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..8124d140
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..21094ff5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..409b925b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..409b925b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..409b925b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..f770a976
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..692ca15b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..692ca15b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..692ca15b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..df6eeb6a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..7d5085c4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..7d5085c4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..7d5085c4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..09962bef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..6379d35b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..6379d35b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..6379d35b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..a7fa733d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..d96fc85b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..d96fc85b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..d96fc85b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..fd4afb4a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..4e1ea441
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..4e1ea441
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..4e1ea441
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..ae462848
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..1eda77b9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..1eda77b9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..1eda77b9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..b83794d0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..811f2671
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..811f2671
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..811f2671
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..5bd5e93d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..9be4a403
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..9be4a403
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..9be4a403
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..c7d2723d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..17965210
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..17965210
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..17965210
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..20a2712b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,31 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..5fee19db
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..5fee19db
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..5fee19db
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,21 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..b27c3e83
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..67544ecd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..67544ecd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..67544ecd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..44ddef4c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..c06b1082
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..c06b1082
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..c06b1082
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..027f45ad
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..7331eb63
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..7331eb63
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..7331eb63
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..1e27f423
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..09e2cf1a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..09e2cf1a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..09e2cf1a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..8407d72e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..0767f489
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..0767f489
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..0767f489
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..9cc28f6c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..0b9c9173
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..0b9c9173
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..0b9c9173
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..675193db
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..4747e6ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..4747e6ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..4747e6ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..171da97b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..8de9bd64
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..8de9bd64
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..8de9bd64
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..fd409bc5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..90368773
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..90368773
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..90368773
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..2e843926
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..400f71dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..400f71dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..400f71dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..65f7549d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..f8047396
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..f8047396
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..f8047396
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..48443883
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..16f19b02
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..16f19b02
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..16f19b02
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..bb5aa3f6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..e5a69ea6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..e5a69ea6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..e5a69ea6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..f2676a86
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,32 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ public MyStruct e1;
+ public MyStruct e2;
+
+ public unsafe ref MyStruct this[int index]
+ {
+ get
+ {
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..cfb5e8a5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..cfb5e8a5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..cfb5e8a5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,22 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ public partial struct MyOtherStruct
+ {
+ [NativeTypeName("MyStruct[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyStruct e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..0710bd40
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyStruct
+
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ MyStruct
+
+
+ ref MyStruct
+
+ int
+
+
+ fixed (MyStruct* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..4070a1e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..4070a1e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..4070a1e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyStruct
+
+
+ InlineArray(3)
+
+ MyStruct
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.CSharp.cs
new file mode 100644
index 00000000..e578cfb9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.CSharp.cs
@@ -0,0 +1,26 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public double* e0;
+ public double* e1;
+ public double* e2;
+
+ public ref double* this[int index]
+ {
+ get
+ {
+ fixed (double** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.Xml.xml
new file mode 100644
index 00000000..3d613894
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ double*
+
+
+
+ double*
+
+
+ double*
+
+
+ double*
+
+
+ ref double*
+
+ int
+
+
+ fixed (double** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.CSharp.cs
new file mode 100644
index 00000000..052732da
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.CSharp.cs
@@ -0,0 +1,26 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public float* e0;
+ public float* e1;
+ public float* e2;
+
+ public ref float* this[int index]
+ {
+ get
+ {
+ fixed (float** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.Xml.xml
new file mode 100644
index 00000000..c0facf22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ float*
+
+
+
+ float*
+
+
+ float*
+
+
+ float*
+
+
+ ref float*
+
+ int
+
+
+ fixed (float** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.CSharp.cs
new file mode 100644
index 00000000..ba8ecc61
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.CSharp.cs
@@ -0,0 +1,26 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public int* e0;
+ public int* e1;
+ public int* e2;
+
+ public ref int* this[int index]
+ {
+ get
+ {
+ fixed (int** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.Xml.xml
new file mode 100644
index 00000000..f53dca6d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ int*
+
+
+
+ int*
+
+
+ int*
+
+
+ int*
+
+
+ ref int*
+
+ int
+
+
+ fixed (int** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.CSharp.cs
new file mode 100644
index 00000000..f5b8de8d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.CSharp.cs
@@ -0,0 +1,26 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public short* e0;
+ public short* e1;
+ public short* e2;
+
+ public ref short* this[int index]
+ {
+ get
+ {
+ fixed (short** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.Xml.xml
new file mode 100644
index 00000000..f8ce703e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ short*
+
+
+
+ short*
+
+
+ short*
+
+
+ short*
+
+
+ ref short*
+
+ int
+
+
+ fixed (short** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..d0555d68
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("double[2][1][3][4]")]
+ public fixed double c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..d2bf56aa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..d2bf56aa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..d2bf56aa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..07b6d238
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..b61dbfd7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..b61dbfd7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..b61dbfd7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..c2beb6a8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("float[2][1][3][4]")]
+ public fixed float c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..a1359e8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..a1359e8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..a1359e8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..f752d135
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..530f8eb3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..530f8eb3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..530f8eb3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..ab4c3b1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("int[2][1][3][4]")]
+ public fixed int c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..eb441349
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..eb441349
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..eb441349
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..51f88db5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..a1c08109
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..a1c08109
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..a1c08109
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..13cc4b44
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("long long[2][1][3][4]")]
+ public fixed long c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..991827c4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..991827c4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..991827c4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..75e900bf
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..438aeb74
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..438aeb74
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..438aeb74
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..786eef44
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("short[2][1][3][4]")]
+ public fixed short c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..fe85308d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..fe85308d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..fe85308d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..049c9f2b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..8d3a5fc2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..8d3a5fc2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..8d3a5fc2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..f63825ad
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public fixed sbyte c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..7fdb305a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..7fdb305a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..7fdb305a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..70a09b4b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..8bfebe63
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..8bfebe63
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..8bfebe63
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..0c8a2e37
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public fixed byte c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..e49861bc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..e49861bc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..e49861bc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..eae77064
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..9ef24de7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..9ef24de7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..9ef24de7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..1c700796
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public fixed uint c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..ff139657
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..ff139657
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..ff139657
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..89dc5c78
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..f2de3b72
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..f2de3b72
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..f2de3b72
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..7e80a1f5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public fixed ulong c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..7a46b36f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..7a46b36f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..7a46b36f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..5c604e8b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..1ef75447
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..1ef75447
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..1ef75447
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..41b46fe0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public fixed ushort c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..a498bd4b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..a498bd4b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..a498bd4b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..1357f155
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..6c292be6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..6c292be6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..6c292be6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..9d5d0e23
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("double[3]")]
+ public fixed double c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..7b85681d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..7b85681d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..7b85681d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..3be23ab1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..27ec8458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..27ec8458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..27ec8458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..516ccdc6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("float[3]")]
+ public fixed float c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..e9f6c5a5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..e9f6c5a5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..e9f6c5a5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..3eb69c35
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..18924d1e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..18924d1e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..18924d1e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..d0352b52
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("int[3]")]
+ public fixed int c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..a07aef4e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..a07aef4e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..a07aef4e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..81d661b8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..79de9c08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..79de9c08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..79de9c08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..615b82b1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("long long[3]")]
+ public fixed long c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..3b2fdb50
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..3b2fdb50
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..3b2fdb50
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..7f002db2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..5a50ebeb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..5a50ebeb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..5a50ebeb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..f185967b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("short[3]")]
+ public fixed short c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..244f6aee
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..244f6aee
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..244f6aee
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..0e397a09
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..56287865
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..56287865
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..56287865
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..abb7f652
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("signed char[3]")]
+ public fixed sbyte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..ad59c3e4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..ad59c3e4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..ad59c3e4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..7d17e781
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..ee4c40f1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..ee4c40f1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..ee4c40f1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..3b46bfb2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[3]")]
+ public fixed byte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..3d311fa8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..3d311fa8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..3d311fa8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..0850a225
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..045ff2e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..045ff2e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..045ff2e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..cd5f73a8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[3]")]
+ public fixed uint c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..fbc49772
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..fbc49772
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..fbc49772
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..06495e73
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..52aaab88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..52aaab88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..52aaab88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..53c93ef3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[3]")]
+ public fixed ulong c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..d5d06922
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..d5d06922
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..d5d06922
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..d3944ad0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..80d63bea
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..80d63bea
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..80d63bea
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..e4d8376e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[3]")]
+ public fixed ushort c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..8a7f743a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..8a7f743a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..8a7f743a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..8acd0285
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..154ebd34
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..154ebd34
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..154ebd34
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..74452b4c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed double c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..316ad2aa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..316ad2aa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..316ad2aa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..8c35c8d8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..b04f25a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..b04f25a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..b04f25a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..e4366884
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed float c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..5a2f4f8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..5a2f4f8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..5a2f4f8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..441b3a7f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..5ad6e431
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..5ad6e431
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..5ad6e431
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..8da8efec
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed int c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..cddcf16e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..cddcf16e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..cddcf16e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..be05554b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..592ded57
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..592ded57
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..592ded57
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..02f87a44
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed long c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..d488df79
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..d488df79
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..d488df79
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..c821688f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..559d2071
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..559d2071
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..559d2071
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..f2d77797
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed short c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..9e0b9082
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..9e0b9082
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..9e0b9082
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..6150c726
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..9eddaddd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..9eddaddd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..9eddaddd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..8a5685f0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed sbyte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..501030e5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..501030e5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..501030e5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..a056420c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..02e21f41
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..02e21f41
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..02e21f41
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..72a1e25a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed byte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..68b93a7a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..68b93a7a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..68b93a7a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..b4fe51f0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..8bc90a1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..8bc90a1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..8bc90a1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..6bec107f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed uint c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..3d75c6d7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..3d75c6d7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..3d75c6d7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..a3291432
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..42fb438a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..42fb438a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..42fb438a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..5dbcb16d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed ulong c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..82779d8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..82779d8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..82779d8f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..23a5295f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..6353dff0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..6353dff0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..6353dff0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..aba68bc0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public fixed ushort c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..e837749d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..e837749d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..e837749d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,16 @@
+using System.Runtime.CompilerServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..eff33d31
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..c75e3da7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..c75e3da7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..c75e3da7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/GuidTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/GuidTest.CSharp.cs
new file mode 100644
index 00000000..edfc8ade
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/GuidTest.CSharp.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [Guid("00000000-0000-0000-C000-000000000046")]
+ public partial struct MyStruct1
+ {
+ public int x;
+ }
+
+ [Guid("00000000-0000-0000-C000-000000000047")]
+ public partial struct MyStruct2
+ {
+ public int x;
+ }
+
+ public static partial class Methods
+ {
+ public static readonly Guid IID_MyStruct1 = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
+
+ public static readonly Guid IID_MyStruct2 = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/GuidTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/GuidTest.Xml.xml
new file mode 100644
index 00000000..3ab1b271
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/GuidTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..a222eef7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("double[]")]
+ public fixed double x[1];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..6b3782b0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public double e0;
+
+ [UnscopedRef]
+ public ref double this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..6b3782b0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public double e0;
+
+ [UnscopedRef]
+ public ref double this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..6b3782b0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("double[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public double e0;
+
+ [UnscopedRef]
+ public ref double this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..2f140981
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..1fe6bb16
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ double
+
+
+
+ double
+
+
+ ref double
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<double>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..1fe6bb16
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ double
+
+
+
+ double
+
+
+ ref double
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<double>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..1fe6bb16
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ double
+
+
+
+ double
+
+
+ ref double
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<double>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..5c6ec6a6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("float[]")]
+ public fixed float x[1];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..198af032
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public float e0;
+
+ [UnscopedRef]
+ public ref float this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..198af032
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public float e0;
+
+ [UnscopedRef]
+ public ref float this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..198af032
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("float[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public float e0;
+
+ [UnscopedRef]
+ public ref float this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..da0f42b5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..f006108f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ float
+
+
+
+ float
+
+
+ ref float
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<float>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..f006108f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ float
+
+
+
+ float
+
+
+ ref float
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<float>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..f006108f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ float
+
+
+
+ float
+
+
+ ref float
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<float>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..bfd8b505
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("int[]")]
+ public fixed int x[1];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..fc0ac830
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public int e0;
+
+ [UnscopedRef]
+ public ref int this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..fc0ac830
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public int e0;
+
+ [UnscopedRef]
+ public ref int this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..fc0ac830
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("int[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public int e0;
+
+ [UnscopedRef]
+ public ref int this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..af5ad1b5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..fc39d3ce
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ int
+
+
+
+ int
+
+
+ ref int
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<int>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..fc39d3ce
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ int
+
+
+
+ int
+
+
+ ref int
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<int>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..fc39d3ce
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ int
+
+
+
+ int
+
+
+ ref int
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<int>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..cabb5ac6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,8 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ [NativeTypeName("short[]")]
+ public fixed short x[1];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..89da35a1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public short e0;
+
+ [UnscopedRef]
+ public ref short this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..89da35a1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public short e0;
+
+ [UnscopedRef]
+ public ref short this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..89da35a1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("short[]")]
+ public _x_e__FixedBuffer x;
+
+ public partial struct _x_e__FixedBuffer
+ {
+ public short e0;
+
+ [UnscopedRef]
+ public ref short this[int index]
+ {
+ get
+ {
+ return ref Unsafe.Add(ref e0, index);
+ }
+ }
+
+ [UnscopedRef]
+ public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length);
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..951de81b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..6d6c0c42
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ short
+
+
+
+ short
+
+
+ ref short
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<short>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..6d6c0c42
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ short
+
+
+
+ short
+
+
+ ref short
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<short>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..6d6c0c42
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/IncompleteArraySizeTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ short
+
+
+
+ short
+
+
+ ref short
+
+ int
+
+
+ return ref Unsafe.Add(ref e0, index);
+
+
+
+ Span<short>
+
+ int
+
+ MemoryMarshal.CreateSpan(ref e0, length);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceTest.CSharp.cs
new file mode 100644
index 00000000..86711f90
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceTest.CSharp.cs
@@ -0,0 +1,28 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1A
+ {
+ public int x;
+
+ public int y;
+ }
+
+ public partial struct MyStruct1B
+ {
+ public int x;
+
+ public int y;
+ }
+
+ [NativeTypeName("struct MyStruct2 : MyStruct1A, MyStruct1B")]
+ public partial struct MyStruct2
+ {
+ public MyStruct1A Base1;
+
+ public MyStruct1B Base2;
+
+ public int z;
+
+ public int w;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceTest.Xml.xml
new file mode 100644
index 00000000..01e2cf9c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceTest.Xml.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+
+
+ MyStruct1A
+
+
+ MyStruct1B
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceWithNativeInheritanceAttributeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceWithNativeInheritanceAttributeTest.CSharp.cs
new file mode 100644
index 00000000..b0652319
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceWithNativeInheritanceAttributeTest.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1A
+ {
+ public int x;
+
+ public int y;
+ }
+
+ public partial struct MyStruct1B
+ {
+ public int x;
+
+ public int y;
+ }
+
+ [NativeTypeName("struct MyStruct2 : MyStruct1A, MyStruct1B")]
+ [NativeInheritance("MyStruct1B")]
+ public partial struct MyStruct2
+ {
+ public MyStruct1A Base1;
+
+ public MyStruct1B Base2;
+
+ public int z;
+
+ public int w;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceWithNativeInheritanceAttributeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceWithNativeInheritanceAttributeTest.Xml.xml
new file mode 100644
index 00000000..5fae7ad1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/InheritanceWithNativeInheritanceAttributeTest.Xml.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+
+
+ MyStruct1A
+
+
+ MyStruct1B
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Compatible.cs
new file mode 100644
index 00000000..0524babb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Compatible.cs
@@ -0,0 +1,175 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ public unsafe partial struct MyStruct
+ {
+ public double x;
+
+ public double y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref double z
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+ }
+ }
+
+ public ref double value1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+ }
+ }
+
+ public ref double value
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+ }
+ }
+
+ public ref double value2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+ }
+ }
+
+ public ref MyUnion u
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+ }
+ }
+
+ public ref double buffer1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._buffer2_e__FixedBuffer buffer2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+ }
+ }
+
+ public unsafe partial struct _Anonymous_e__Struct
+ {
+ public double z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("double[4]")]
+ public fixed double buffer1[4];
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public double value;
+ }
+
+ public unsafe partial struct _Anonymous1_e__Struct
+ {
+ public double value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public double value2;
+ }
+
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+ public MyUnion e3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Default.cs
new file mode 100644
index 00000000..d51e6cb2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Default.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ public partial struct MyStruct
+ {
+ public double x;
+
+ public double y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref double z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("double[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public double value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public double value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public double value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public double e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Latest.cs
new file mode 100644
index 00000000..d51e6cb2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Latest.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ public partial struct MyStruct
+ {
+ public double x;
+
+ public double y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref double z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("double[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public double value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public double value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public double value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public double e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Preview.cs
new file mode 100644
index 00000000..d51e6cb2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.CSharp.Preview.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ public partial struct MyStruct
+ {
+ public double x;
+
+ public double y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref double z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref double value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("double[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public double value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public double value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public double value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public double e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Compatible.xml
new file mode 100644
index 00000000..4c1c7ce6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Compatible.xml
@@ -0,0 +1,165 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+
+
+
+ ref double
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+
+
+
+ ref double
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+
+
+
+ ref double
+
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+
+
+
+ ref MyUnion
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+
+
+
+ ref double
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+
+
+
+ ref _Anonymous_e__Struct._buffer2_e__FixedBuffer
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+
+
+
+
+ double
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ double
+
+
+ MyUnion
+
+
+
+ double
+
+
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+
+ double
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Default.xml
new file mode 100644
index 00000000..0a49aae3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Default.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<double>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ double
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ double
+
+
+ MyUnion
+
+
+
+ double
+
+
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+
+ double
+
+
+
+
+
+ double
+
+
+
+ InlineArray(4)
+
+ double
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Latest.xml
new file mode 100644
index 00000000..0a49aae3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Latest.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<double>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ double
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ double
+
+
+ MyUnion
+
+
+
+ double
+
+
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+
+ double
+
+
+
+
+
+ double
+
+
+
+ InlineArray(4)
+
+ double
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Preview.xml
new file mode 100644
index 00000000..0a49aae3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_double_5Fdouble_5F10_5F5.Xml.Preview.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref double
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<double>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ double
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ double
+
+
+ MyUnion
+
+
+
+ double
+
+
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+
+ double
+
+
+
+
+
+ double
+
+
+
+ InlineArray(4)
+
+ double
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Compatible.cs
new file mode 100644
index 00000000..7c929e5b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Compatible.cs
@@ -0,0 +1,175 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ public unsafe partial struct MyStruct
+ {
+ public float x;
+
+ public float y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref float z
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+ }
+ }
+
+ public ref float value1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+ }
+ }
+
+ public ref float value
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+ }
+ }
+
+ public ref float value2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+ }
+ }
+
+ public ref MyUnion u
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+ }
+ }
+
+ public ref float buffer1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._buffer2_e__FixedBuffer buffer2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+ }
+ }
+
+ public unsafe partial struct _Anonymous_e__Struct
+ {
+ public float z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("float[4]")]
+ public fixed float buffer1[4];
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public float value;
+ }
+
+ public unsafe partial struct _Anonymous1_e__Struct
+ {
+ public float value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public float value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public float value2;
+ }
+
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+ public MyUnion e3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Default.cs
new file mode 100644
index 00000000..721f7b22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Default.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ public partial struct MyStruct
+ {
+ public float x;
+
+ public float y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref float z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public float z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("float[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public float value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public float value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public float value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public float value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public float e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Latest.cs
new file mode 100644
index 00000000..721f7b22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Latest.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ public partial struct MyStruct
+ {
+ public float x;
+
+ public float y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref float z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public float z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("float[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public float value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public float value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public float value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public float value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public float e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Preview.cs
new file mode 100644
index 00000000..721f7b22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.CSharp.Preview.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ public partial struct MyStruct
+ {
+ public float x;
+
+ public float y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref float z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref float value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public float z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("float[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public float value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public float value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public float value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public float value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public float e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Compatible.xml
new file mode 100644
index 00000000..6124f5f2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Compatible.xml
@@ -0,0 +1,165 @@
+
+
+
+
+
+ float
+
+
+
+
+ float
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+ ref float
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+
+
+
+ ref float
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+
+
+
+ ref float
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+
+
+
+ ref float
+
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+
+
+
+ ref MyUnion
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+
+
+
+ ref float
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+
+
+
+ ref _Anonymous_e__Struct._buffer2_e__FixedBuffer
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+
+
+
+
+ float
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ float
+
+
+ MyUnion
+
+
+
+ float
+
+
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+
+ float
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Default.xml
new file mode 100644
index 00000000..b4b5d559
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Default.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ float
+
+
+
+
+ float
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+ ref float
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<float>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ float
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ float
+
+
+ MyUnion
+
+
+
+ float
+
+
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+
+ float
+
+
+
+
+
+ float
+
+
+
+ InlineArray(4)
+
+ float
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Latest.xml
new file mode 100644
index 00000000..b4b5d559
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Latest.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ float
+
+
+
+
+ float
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+ ref float
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<float>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ float
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ float
+
+
+ MyUnion
+
+
+
+ float
+
+
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+
+ float
+
+
+
+
+
+ float
+
+
+
+ InlineArray(4)
+
+ float
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Preview.xml
new file mode 100644
index 00000000..b4b5d559
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_float_5Ffloat_5F10_5F5.Xml.Preview.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ float
+
+
+
+
+ float
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+ ref float
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref float
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<float>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ float
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ float
+
+
+ MyUnion
+
+
+
+ float
+
+
+
+
+ float
+
+
+ _Anonymous_e__Struct
+
+
+
+ float
+
+
+
+
+
+ float
+
+
+
+ InlineArray(4)
+
+ float
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Compatible.cs
new file mode 100644
index 00000000..58f2acf4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Compatible.cs
@@ -0,0 +1,175 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ public unsafe partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref int z
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+ }
+ }
+
+ public ref int value1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+ }
+ }
+
+ public ref int value
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+ }
+ }
+
+ public ref int value2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+ }
+ }
+
+ public ref MyUnion u
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+ }
+ }
+
+ public ref int buffer1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._buffer2_e__FixedBuffer buffer2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+ }
+ }
+
+ public unsafe partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("int[4]")]
+ public fixed int buffer1[4];
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public int value;
+ }
+
+ public unsafe partial struct _Anonymous1_e__Struct
+ {
+ public int value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public int value2;
+ }
+
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+ public MyUnion e3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Default.cs
new file mode 100644
index 00000000..2f773ed0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Default.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ public partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("int[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public int value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public int value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public int value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public int e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Latest.cs
new file mode 100644
index 00000000..2f773ed0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Latest.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ public partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("int[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public int value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public int value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public int value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public int e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Preview.cs
new file mode 100644
index 00000000..2f773ed0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.CSharp.Preview.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ public partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("int[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public int value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public int value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public int value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public int e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Compatible.xml
new file mode 100644
index 00000000..44418cea
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Compatible.xml
@@ -0,0 +1,165 @@
+
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+
+
+
+ ref MyUnion
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+
+
+
+ ref _Anonymous_e__Struct._buffer2_e__FixedBuffer
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+
+
+
+
+ int
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ int
+
+
+ MyUnion
+
+
+
+ int
+
+
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+
+ int
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Default.xml
new file mode 100644
index 00000000..7a4a63ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Default.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<int>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ int
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ int
+
+
+ MyUnion
+
+
+
+ int
+
+
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+
+ int
+
+
+
+
+
+ int
+
+
+
+ InlineArray(4)
+
+ int
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Latest.xml
new file mode 100644
index 00000000..7a4a63ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Latest.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<int>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ int
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ int
+
+
+ MyUnion
+
+
+
+ int
+
+
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+
+ int
+
+
+
+
+
+ int
+
+
+
+ InlineArray(4)
+
+ int
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Preview.xml
new file mode 100644
index 00000000..7a4a63ab
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_int_5Fint_5F10_5F5.Xml.Preview.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<int>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ int
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ int
+
+
+ MyUnion
+
+
+
+ int
+
+
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+
+ int
+
+
+
+
+
+ int
+
+
+
+ InlineArray(4)
+
+ int
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Compatible.cs
new file mode 100644
index 00000000..cdae9f20
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Compatible.cs
@@ -0,0 +1,175 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ public unsafe partial struct MyStruct
+ {
+ public short x;
+
+ public short y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref short z
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+ }
+ }
+
+ public ref short value1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+ }
+ }
+
+ public ref short value
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+ }
+ }
+
+ public ref short value2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+ }
+ }
+
+ public ref MyUnion u
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+ }
+ }
+
+ public ref short buffer1
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+ }
+ }
+
+ public ref _Anonymous_e__Struct._buffer2_e__FixedBuffer buffer2
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+ }
+ }
+
+ public unsafe partial struct _Anonymous_e__Struct
+ {
+ public short z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("short[4]")]
+ public fixed short buffer1[4];
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public short value;
+ }
+
+ public unsafe partial struct _Anonymous1_e__Struct
+ {
+ public short value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public short value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public short value2;
+ }
+
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+ public MyUnion e3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Default.cs
new file mode 100644
index 00000000..b31e1091
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Default.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ public partial struct MyStruct
+ {
+ public short x;
+
+ public short y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref short z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public short z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("short[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public short value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public short value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public short value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public short value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public short e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Latest.cs
new file mode 100644
index 00000000..b31e1091
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Latest.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ public partial struct MyStruct
+ {
+ public short x;
+
+ public short y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref short z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public short z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("short[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public short value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public short value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public short value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public short value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public short e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Preview.cs
new file mode 100644
index 00000000..b31e1091
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.CSharp.Preview.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ public partial struct MyStruct
+ {
+ public short x;
+
+ public short y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref short z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref _Anonymous_e__Struct._w_e__Struct w
+ {
+ get
+ {
+ return ref Anonymous.w;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value1
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.value1;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.Anonymous.value;
+ }
+ }
+
+ [UnscopedRef]
+ public ref short value2
+ {
+ get
+ {
+ return ref Anonymous.Anonymous2.value2;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyUnion u
+ {
+ get
+ {
+ return ref Anonymous.u;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer1
+ {
+ get
+ {
+ return Anonymous.buffer1;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer2
+ {
+ get
+ {
+ return Anonymous.buffer2;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public short z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C9")]
+ public _w_e__Struct w;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L19_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L29_C9")]
+ public _Anonymous2_e__Union Anonymous2;
+
+ public MyUnion u;
+
+ [NativeTypeName("short[4]")]
+ public _buffer1_e__FixedBuffer buffer1;
+
+ [NativeTypeName("MyUnion[4]")]
+ public _buffer2_e__FixedBuffer buffer2;
+
+ public partial struct _w_e__Struct
+ {
+ public short value;
+ }
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public short value1;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L23_C13")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public short value;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous2_e__Union
+ {
+ [FieldOffset(0)]
+ public short value2;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer1_e__FixedBuffer
+ {
+ public short e0;
+ }
+
+ [InlineArray(4)]
+ public partial struct _buffer2_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Compatible.xml
new file mode 100644
index 00000000..16472978
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Compatible.xml
@@ -0,0 +1,165 @@
+
+
+
+
+
+ short
+
+
+
+
+ short
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+ ref short
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->w;
+ }
+
+
+
+ ref short
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->value1;
+ }
+
+
+
+ ref short
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous)
+ {
+ return ref pField->value;
+ }
+
+
+
+ ref short
+
+ fixed (_Anonymous_e__Struct._Anonymous2_e__Union* pField = &Anonymous.Anonymous2)
+ {
+ return ref pField->value2;
+ }
+
+
+
+ ref MyUnion
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->u;
+ }
+
+
+
+ ref short
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer1[0];
+ }
+
+
+
+ ref _Anonymous_e__Struct._buffer2_e__FixedBuffer
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->buffer2;
+ }
+
+
+
+
+ short
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ short
+
+
+ MyUnion
+
+
+
+ short
+
+
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+
+ short
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Default.xml
new file mode 100644
index 00000000..a2e31106
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Default.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ short
+
+
+
+
+ short
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+ ref short
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<short>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ short
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ short
+
+
+ MyUnion
+
+
+
+ short
+
+
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+
+ short
+
+
+
+
+
+ short
+
+
+
+ InlineArray(4)
+
+ short
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Latest.xml
new file mode 100644
index 00000000..a2e31106
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Latest.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ short
+
+
+
+
+ short
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+ ref short
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<short>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ short
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ short
+
+
+ MyUnion
+
+
+
+ short
+
+
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+
+ short
+
+
+
+
+
+ short
+
+
+
+ InlineArray(4)
+
+ short
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Preview.xml
new file mode 100644
index 00000000..a2e31106
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousTest_short_5Fshort_5F10_5F5.Xml.Preview.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+ short
+
+
+
+
+ short
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+ ref short
+
+ return ref Anonymous.z;
+
+
+
+ ref _Anonymous_e__Struct._w_e__Struct
+
+ return ref Anonymous.w;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous1.value1;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous1.Anonymous.value;
+
+
+
+ ref short
+
+ return ref Anonymous.Anonymous2.value2;
+
+
+
+ ref MyUnion
+
+ return ref Anonymous.u;
+
+
+
+ Span<short>
+
+ return Anonymous.buffer1;
+
+
+
+ Span<MyUnion>
+
+ return Anonymous.buffer2;
+
+
+
+
+ short
+
+
+ _w_e__Struct
+
+
+ _Anonymous1_e__Struct
+
+
+ _Anonymous2_e__Union
+
+
+ MyUnion
+
+
+ short
+
+
+ MyUnion
+
+
+
+ short
+
+
+
+
+ short
+
+
+ _Anonymous_e__Struct
+
+
+
+ short
+
+
+
+
+
+ short
+
+
+
+ InlineArray(4)
+
+ short
+
+
+
+ InlineArray(4)
+
+ MyUnion
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..a5c7f6d5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Compatible.cs
@@ -0,0 +1,103 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref int z
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+ }
+ }
+
+ public ref int w
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->w;
+ }
+ }
+ }
+
+ public int o0_b0_16
+ {
+ get
+ {
+ return Anonymous.Anonymous1.o0_b0_16;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b0_16 = value;
+ }
+ }
+
+ public int o0_b16_4
+ {
+ get
+ {
+ return Anonymous.Anonymous1.o0_b16_4;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b16_4 = value;
+ }
+ }
+
+ public unsafe partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public int w;
+
+ public int _bitfield;
+
+ [NativeTypeName("int : 16")]
+ public int o0_b0_16
+ {
+ get
+ {
+ return (_bitfield << 16) >> 16;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+ }
+ }
+
+ [NativeTypeName("int : 4")]
+ public int o0_b16_4
+ {
+ get
+ {
+ return (_bitfield << 12) >> 28;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Default.cs
new file mode 100644
index 00000000..22edc69c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Default.cs
@@ -0,0 +1,101 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int w
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.w;
+ }
+ }
+
+ public int o0_b0_16
+ {
+ readonly get
+ {
+ return Anonymous.Anonymous1.o0_b0_16;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b0_16 = value;
+ }
+ }
+
+ public int o0_b16_4
+ {
+ readonly get
+ {
+ return Anonymous.Anonymous1.o0_b16_4;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b16_4 = value;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public int w;
+
+ public int _bitfield;
+
+ [NativeTypeName("int : 16")]
+ public int o0_b0_16
+ {
+ readonly get
+ {
+ return (_bitfield << 16) >> 16;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+ }
+ }
+
+ [NativeTypeName("int : 4")]
+ public int o0_b16_4
+ {
+ readonly get
+ {
+ return (_bitfield << 12) >> 28;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Latest.cs
new file mode 100644
index 00000000..22edc69c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Latest.cs
@@ -0,0 +1,101 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int w
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.w;
+ }
+ }
+
+ public int o0_b0_16
+ {
+ readonly get
+ {
+ return Anonymous.Anonymous1.o0_b0_16;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b0_16 = value;
+ }
+ }
+
+ public int o0_b16_4
+ {
+ readonly get
+ {
+ return Anonymous.Anonymous1.o0_b16_4;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b16_4 = value;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public int w;
+
+ public int _bitfield;
+
+ [NativeTypeName("int : 16")]
+ public int o0_b0_16
+ {
+ readonly get
+ {
+ return (_bitfield << 16) >> 16;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+ }
+ }
+
+ [NativeTypeName("int : 4")]
+ public int o0_b16_4
+ {
+ readonly get
+ {
+ return (_bitfield << 12) >> 28;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Preview.cs
new file mode 100644
index 00000000..22edc69c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.CSharp.Preview.cs
@@ -0,0 +1,101 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int x;
+
+ public int y;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref int z
+ {
+ get
+ {
+ return ref Anonymous.z;
+ }
+ }
+
+ [UnscopedRef]
+ public ref int w
+ {
+ get
+ {
+ return ref Anonymous.Anonymous1.w;
+ }
+ }
+
+ public int o0_b0_16
+ {
+ readonly get
+ {
+ return Anonymous.Anonymous1.o0_b0_16;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b0_16 = value;
+ }
+ }
+
+ public int o0_b16_4
+ {
+ readonly get
+ {
+ return Anonymous.Anonymous1.o0_b16_4;
+ }
+
+ set
+ {
+ Anonymous.Anonymous1.o0_b16_4 = value;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public int z;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")]
+ public _Anonymous1_e__Struct Anonymous1;
+
+ public partial struct _Anonymous1_e__Struct
+ {
+ public int w;
+
+ public int _bitfield;
+
+ [NativeTypeName("int : 16")]
+ public int o0_b0_16
+ {
+ readonly get
+ {
+ return (_bitfield << 16) >> 16;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+ }
+ }
+
+ [NativeTypeName("int : 4")]
+ public int o0_b16_4
+ {
+ readonly get
+ {
+ return (_bitfield << 12) >> 28;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Compatible.xml
new file mode 100644
index 00000000..be53c945
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Compatible.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->z;
+ }
+
+
+
+ ref int
+
+ fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1)
+ {
+ return ref pField->w;
+ }
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b0_16;
+
+
+ Anonymous.Anonymous1.o0_b0_16 = value;
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b16_4;
+
+
+ Anonymous.Anonymous1.o0_b16_4 = value;
+
+
+
+
+ int
+
+
+ _Anonymous1_e__Struct
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+ return (_bitfield << 16) >> 16;
+
+
+
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+
+
+
+ int
+
+ return (_bitfield << 12) >> 28;
+
+
+
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Default.xml
new file mode 100644
index 00000000..d2a1ad2a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Default.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.z;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.w;
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b0_16;
+
+
+ Anonymous.Anonymous1.o0_b0_16 = value;
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b16_4;
+
+
+ Anonymous.Anonymous1.o0_b16_4 = value;
+
+
+
+
+ int
+
+
+ _Anonymous1_e__Struct
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+ return (_bitfield << 16) >> 16;
+
+
+
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+
+
+
+ int
+
+ return (_bitfield << 12) >> 28;
+
+
+
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Latest.xml
new file mode 100644
index 00000000..d2a1ad2a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Latest.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.z;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.w;
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b0_16;
+
+
+ Anonymous.Anonymous1.o0_b0_16 = value;
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b16_4;
+
+
+ Anonymous.Anonymous1.o0_b16_4 = value;
+
+
+
+
+ int
+
+
+ _Anonymous1_e__Struct
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+ return (_bitfield << 16) >> 16;
+
+
+
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+
+
+
+ int
+
+ return (_bitfield << 12) >> 28;
+
+
+
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Preview.xml
new file mode 100644
index 00000000..d2a1ad2a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedAnonymousWithBitfieldTest.Xml.Preview.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ _Anonymous_e__Struct
+
+
+ ref int
+
+ return ref Anonymous.z;
+
+
+
+ ref int
+
+ return ref Anonymous.Anonymous1.w;
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b0_16;
+
+
+ Anonymous.Anonymous1.o0_b0_16 = value;
+
+
+
+ int
+
+ return Anonymous.Anonymous1.o0_b16_4;
+
+
+ Anonymous.Anonymous1.o0_b16_4 = value;
+
+
+
+
+ int
+
+
+ _Anonymous1_e__Struct
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+ return (_bitfield << 16) >> 16;
+
+
+
+ _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF);
+
+
+
+ int
+
+ return (_bitfield << 12) >> 28;
+
+
+
+ _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16);
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_double_5Fdouble.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_double_5Fdouble.CSharp.cs
new file mode 100644
index 00000000..0cb50df0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_double_5Fdouble.CSharp.cs
@@ -0,0 +1,22 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+
+ public partial struct MyNestedStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+
+ public double a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_double_5Fdouble.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_double_5Fdouble.Xml.xml
new file mode 100644
index 00000000..8672ce0a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_double_5Fdouble.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_float_5Ffloat.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_float_5Ffloat.CSharp.cs
new file mode 100644
index 00000000..0f24586d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_float_5Ffloat.CSharp.cs
@@ -0,0 +1,22 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float r;
+
+ public float g;
+
+ public float b;
+
+ public partial struct MyNestedStruct
+ {
+ public float r;
+
+ public float g;
+
+ public float b;
+
+ public float a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_float_5Ffloat.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_float_5Ffloat.Xml.xml
new file mode 100644
index 00000000..b7251916
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_float_5Ffloat.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..c0723de1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_int_5Fint.CSharp.cs
@@ -0,0 +1,22 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int r;
+
+ public int g;
+
+ public int b;
+
+ public partial struct MyNestedStruct
+ {
+ public int r;
+
+ public int g;
+
+ public int b;
+
+ public int a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_int_5Fint.Xml.xml
new file mode 100644
index 00000000..a93f89d6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_int_5Fint.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..00a0b246
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_short_5Fshort.CSharp.cs
@@ -0,0 +1,22 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short r;
+
+ public short g;
+
+ public short b;
+
+ public partial struct MyNestedStruct
+ {
+ public short r;
+
+ public short g;
+
+ public short b;
+
+ public short a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..79228db5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedTest_short_5Fshort.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..f2ef4c84
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("bool")]
+ public byte r;
+
+ [NativeTypeName("bool")]
+ public byte g;
+
+ [NativeTypeName("bool")]
+ public byte b;
+
+ public partial struct MyNestedStruct
+ {
+ [NativeTypeName("bool")]
+ public byte r;
+
+ [NativeTypeName("bool")]
+ public byte g;
+
+ [NativeTypeName("bool")]
+ public byte b;
+
+ [NativeTypeName("bool")]
+ public byte a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_bool_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
new file mode 100644
index 00000000..6a9f2e89
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
new file mode 100644
index 00000000..aeed502a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long")]
+ public long r;
+
+ [NativeTypeName("long long")]
+ public long g;
+
+ [NativeTypeName("long long")]
+ public long b;
+
+ public partial struct MyNestedStruct
+ {
+ [NativeTypeName("long long")]
+ public long r;
+
+ [NativeTypeName("long long")]
+ public long g;
+
+ [NativeTypeName("long long")]
+ public long b;
+
+ [NativeTypeName("long long")]
+ public long a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_long_20long_5Flong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
new file mode 100644
index 00000000..8e5592f9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ long
+
+
+ long
+
+
+ long
+
+
+
+ long
+
+
+ long
+
+
+ long
+
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
new file mode 100644
index 00000000..4643558b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte r;
+
+ [NativeTypeName("signed char")]
+ public sbyte g;
+
+ [NativeTypeName("signed char")]
+ public sbyte b;
+
+ public partial struct MyNestedStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte r;
+
+ [NativeTypeName("signed char")]
+ public sbyte g;
+
+ [NativeTypeName("signed char")]
+ public sbyte b;
+
+ [NativeTypeName("signed char")]
+ public sbyte a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
new file mode 100644
index 00000000..a27f86f2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..7a1e283b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte r;
+
+ [NativeTypeName("unsigned char")]
+ public byte g;
+
+ [NativeTypeName("unsigned char")]
+ public byte b;
+
+ public partial struct MyNestedStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte r;
+
+ [NativeTypeName("unsigned char")]
+ public byte g;
+
+ [NativeTypeName("unsigned char")]
+ public byte b;
+
+ [NativeTypeName("unsigned char")]
+ public byte a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
new file mode 100644
index 00000000..62264b8c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
new file mode 100644
index 00000000..5bad1ccb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint r;
+
+ [NativeTypeName("unsigned int")]
+ public uint g;
+
+ [NativeTypeName("unsigned int")]
+ public uint b;
+
+ public partial struct MyNestedStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint r;
+
+ [NativeTypeName("unsigned int")]
+ public uint g;
+
+ [NativeTypeName("unsigned int")]
+ public uint b;
+
+ [NativeTypeName("unsigned int")]
+ public uint a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
new file mode 100644
index 00000000..55fbc543
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
new file mode 100644
index 00000000..843e7437
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong r;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong g;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong b;
+
+ public partial struct MyNestedStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong r;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong g;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong b;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
new file mode 100644
index 00000000..65261b85
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
new file mode 100644
index 00000000..63d7f1e0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
@@ -0,0 +1,29 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort r;
+
+ [NativeTypeName("unsigned short")]
+ public ushort g;
+
+ [NativeTypeName("unsigned short")]
+ public ushort b;
+
+ public partial struct MyNestedStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort r;
+
+ [NativeTypeName("unsigned short")]
+ public ushort g;
+
+ [NativeTypeName("unsigned short")]
+ public ushort b;
+
+ [NativeTypeName("unsigned short")]
+ public ushort a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
new file mode 100644
index 00000000..eb513bd1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NestedWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NewKeywordTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NewKeywordTest.CSharp.cs
new file mode 100644
index 00000000..268fbc52
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NewKeywordTest.CSharp.cs
@@ -0,0 +1,19 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public new int Equals;
+
+ public int Dispose;
+
+ public new int GetHashCode;
+
+ public new int GetType;
+
+ public new int MemberwiseClone;
+
+ public new int ReferenceEquals;
+
+ public new int ToString;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NewKeywordTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NewKeywordTest.Xml.xml
new file mode 100644
index 00000000..3ad7bec1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NewKeywordTest.Xml.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NoDefinitionTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NoDefinitionTest.CSharp.cs
new file mode 100644
index 00000000..e82ea8f7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NoDefinitionTest.CSharp.cs
@@ -0,0 +1,6 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NoDefinitionTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NoDefinitionTest.Xml.xml
new file mode 100644
index 00000000..c71e9923
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/NoDefinitionTest.Xml.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PackTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PackTest.CSharp.cs
new file mode 100644
index 00000000..eb72be11
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PackTest.CSharp.cs
@@ -0,0 +1,27 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct1
+ {
+ [NativeTypeName("unsigned int")]
+ public uint Field1;
+
+ public void* Field2;
+
+ [NativeTypeName("unsigned int")]
+ public uint Field3;
+ }
+
+ [StructLayout(LayoutKind.Sequential, Pack = 4)]
+ public unsafe partial struct MyStruct2
+ {
+ [NativeTypeName("unsigned int")]
+ public uint Field1;
+
+ public void* Field2;
+
+ [NativeTypeName("unsigned int")]
+ public uint Field3;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PackTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PackTest.Xml.xml
new file mode 100644
index 00000000..5c56d36c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PackTest.Xml.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ uint
+
+
+ void*
+
+
+ uint
+
+
+
+
+ uint
+
+
+ void*
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfTest.CSharp.cs
new file mode 100644
index 00000000..20c5b911
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfTest.CSharp.cs
@@ -0,0 +1,9 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct example_s
+ {
+ public example_s* next;
+
+ public void* data;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfTest.Xml.xml
new file mode 100644
index 00000000..fb82329b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfTest.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ example_s*
+
+
+ void*
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfViaTypedefTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfViaTypedefTest.CSharp.cs
new file mode 100644
index 00000000..d5808dba
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfViaTypedefTest.CSharp.cs
@@ -0,0 +1,10 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct example_s
+ {
+ [NativeTypeName("example_t *")]
+ public example_s* next;
+
+ public void* data;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfViaTypedefTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfViaTypedefTest.Xml.xml
new file mode 100644
index 00000000..383d5ee7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/PointerToSelfViaTypedefTest.Xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ example_s*
+
+
+ void*
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..f96a212d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Compatible.cs
@@ -0,0 +1,30 @@
+namespace ClangSharp.Test
+{
+ public unsafe partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ public ref double a
+ {
+ get
+ {
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->a;
+ }
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Default.cs
new file mode 100644
index 00000000..0cae780e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Default.cs
@@ -0,0 +1,30 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref double a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Latest.cs
new file mode 100644
index 00000000..0cae780e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Latest.cs
@@ -0,0 +1,30 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref double a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Preview.cs
new file mode 100644
index 00000000..0cae780e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.CSharp.Preview.cs
@@ -0,0 +1,30 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")]
+ public _Anonymous_e__Struct Anonymous;
+
+ [UnscopedRef]
+ public ref double a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ public partial struct _Anonymous_e__Struct
+ {
+ public double a;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Compatible.xml
new file mode 100644
index 00000000..17842151
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Compatible.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ fixed (_Anonymous_e__Struct* pField = &Anonymous)
+ {
+ return ref pField->a;
+ }
+
+
+
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Default.xml
new file mode 100644
index 00000000..fc65fe70
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Default.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ return ref Anonymous.a;
+
+
+
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Latest.xml
new file mode 100644
index 00000000..fc65fe70
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Latest.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ return ref Anonymous.a;
+
+
+
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Preview.xml
new file mode 100644
index 00000000..fc65fe70
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapNestedAnonymousTest.Xml.Preview.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Struct
+
+
+ ref double
+
+ return ref Anonymous.a;
+
+
+
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapTest.CSharp.cs
new file mode 100644
index 00000000..e82ea8f7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapTest.CSharp.cs
@@ -0,0 +1,6 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapTest.Xml.xml
new file mode 100644
index 00000000..c71e9923
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/RemapTest.Xml.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionPointerTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionPointerTest.CSharp.cs
new file mode 100644
index 00000000..e82ea8f7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionPointerTest.CSharp.cs
@@ -0,0 +1,6 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionPointerTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionPointerTest.Xml.xml
new file mode 100644
index 00000000..c71e9923
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionPointerTest.Xml.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_double_5Fdouble.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_double_5Fdouble.CSharp.cs
new file mode 100644
index 00000000..5ae4f8fe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_double_5Fdouble.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double r;
+
+ public double g;
+
+ public double b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_double_5Fdouble.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_double_5Fdouble.Xml.xml
new file mode 100644
index 00000000..5077cd83
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_double_5Fdouble.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_float_5Ffloat.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_float_5Ffloat.CSharp.cs
new file mode 100644
index 00000000..af54b381
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_float_5Ffloat.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float r;
+
+ public float g;
+
+ public float b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_float_5Ffloat.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_float_5Ffloat.Xml.xml
new file mode 100644
index 00000000..374ff19a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_float_5Ffloat.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..30d6c633
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_int_5Fint.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public int r;
+
+ public int g;
+
+ public int b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_int_5Fint.Xml.xml
new file mode 100644
index 00000000..27257476
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_int_5Fint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..eb6aff08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_short_5Fshort.CSharp.cs
@@ -0,0 +1,11 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public short r;
+
+ public short g;
+
+ public short b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..bbd27e31
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionTest_short_5Fshort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..2459a799
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("bool")]
+ public byte r;
+
+ [NativeTypeName("bool")]
+ public byte g;
+
+ [NativeTypeName("bool")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_bool_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
new file mode 100644
index 00000000..2efd5005
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
new file mode 100644
index 00000000..b7fe72ca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("long long")]
+ public long r;
+
+ [NativeTypeName("long long")]
+ public long g;
+
+ [NativeTypeName("long long")]
+ public long b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_long_20long_5Flong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
new file mode 100644
index 00000000..510adc82
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ long
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
new file mode 100644
index 00000000..76c52d3c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("signed char")]
+ public sbyte r;
+
+ [NativeTypeName("signed char")]
+ public sbyte g;
+
+ [NativeTypeName("signed char")]
+ public sbyte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
new file mode 100644
index 00000000..ef4a07bf
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..efea8ec7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned char")]
+ public byte r;
+
+ [NativeTypeName("unsigned char")]
+ public byte g;
+
+ [NativeTypeName("unsigned char")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
new file mode 100644
index 00000000..9dbe4132
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
new file mode 100644
index 00000000..6bced97f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned int")]
+ public uint r;
+
+ [NativeTypeName("unsigned int")]
+ public uint g;
+
+ [NativeTypeName("unsigned int")]
+ public uint b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
new file mode 100644
index 00000000..0e7bdb22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
new file mode 100644
index 00000000..4b6da458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned long long")]
+ public ulong r;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong g;
+
+ [NativeTypeName("unsigned long long")]
+ public ulong b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
new file mode 100644
index 00000000..e8cfdc96
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
new file mode 100644
index 00000000..91e4bec0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("unsigned short")]
+ public ushort r;
+
+ [NativeTypeName("unsigned short")]
+ public ushort g;
+
+ [NativeTypeName("unsigned short")]
+ public ushort b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
new file mode 100644
index 00000000..207d533d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SkipNonDefinitionWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SourceLocationAttributeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SourceLocationAttributeTest.CSharp.cs
new file mode 100644
index 00000000..00f49ab9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SourceLocationAttributeTest.CSharp.cs
@@ -0,0 +1,15 @@
+namespace ClangSharp.Test
+{
+ [SourceLocation("ClangUnsavedFile.h", 1, 8)]
+ public partial struct MyStruct
+ {
+ [SourceLocation("ClangUnsavedFile.h", 3, 9)]
+ public int r;
+
+ [SourceLocation("ClangUnsavedFile.h", 4, 9)]
+ public int g;
+
+ [SourceLocation("ClangUnsavedFile.h", 5, 9)]
+ public int b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SourceLocationAttributeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SourceLocationAttributeTest.Xml.xml
new file mode 100644
index 00000000..27257476
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/SourceLocationAttributeTest.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_bool_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_bool_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..1b869c55
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_bool_5Fbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public byte r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public byte g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_bool_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_bool_5Fbyte.Xml.xml
new file mode 100644
index 00000000..e1d86744
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_bool_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_double_5Fdouble.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_double_5Fdouble.CSharp.cs
new file mode 100644
index 00000000..2e7f1255
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_double_5Fdouble.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public double r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public double g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public double b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_double_5Fdouble.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_double_5Fdouble.Xml.xml
new file mode 100644
index 00000000..b9487771
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_double_5Fdouble.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_float_5Ffloat.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_float_5Ffloat.CSharp.cs
new file mode 100644
index 00000000..ec433d1c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_float_5Ffloat.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public float r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public float g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public float b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_float_5Ffloat.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_float_5Ffloat.Xml.xml
new file mode 100644
index 00000000..46893195
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_float_5Ffloat.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..ce830e39
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_int_5Fint.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public int r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public int g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public int b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_int_5Fint.Xml.xml
new file mode 100644
index 00000000..00c2a638
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_int_5Fint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_long_20long_5Flong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_long_20long_5Flong.CSharp.cs
new file mode 100644
index 00000000..a1befffe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_long_20long_5Flong.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public long r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public long g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public long b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_long_20long_5Flong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_long_20long_5Flong.Xml.xml
new file mode 100644
index 00000000..059eac1b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_long_20long_5Flong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ long
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..66d5e77f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_short_5Fshort.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public short r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public short g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public short b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..6a9c6061
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_short_5Fshort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_signed_20char_5Fsbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_signed_20char_5Fsbyte.CSharp.cs
new file mode 100644
index 00000000..0d4c8f49
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_signed_20char_5Fsbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public sbyte r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public sbyte g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public sbyte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_signed_20char_5Fsbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_signed_20char_5Fsbyte.Xml.xml
new file mode 100644
index 00000000..94144e5d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_signed_20char_5Fsbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20char_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20char_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..1b869c55
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20char_5Fbyte.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public byte r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public byte g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20char_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20char_5Fbyte.Xml.xml
new file mode 100644
index 00000000..e1d86744
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20char_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20int_5Fuint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20int_5Fuint.CSharp.cs
new file mode 100644
index 00000000..89dce023
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20int_5Fuint.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public uint r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public uint g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public uint b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20int_5Fuint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20int_5Fuint.Xml.xml
new file mode 100644
index 00000000..de4a5ff6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20int_5Fuint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20long_20long_5Fulong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20long_20long_5Fulong.CSharp.cs
new file mode 100644
index 00000000..8e49a258
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20long_20long_5Fulong.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public ulong r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public ulong g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public ulong b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20long_20long_5Fulong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20long_20long_5Fulong.Xml.xml
new file mode 100644
index 00000000..eb3265b7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20long_20long_5Fulong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20short_5Fushort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20short_5Fushort.CSharp.cs
new file mode 100644
index 00000000..8560828a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20short_5Fushort.CSharp.cs
@@ -0,0 +1,14 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ [NativeTypeName("MyTypedefAlias")]
+ public ushort r;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public ushort g;
+
+ [NativeTypeName("MyTypedefAlias")]
+ public ushort b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20short_5Fushort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20short_5Fushort.Xml.xml
new file mode 100644
index 00000000..431148e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/TypedefTest_unsigned_20short_5Fushort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/UsingDeclarationTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/UsingDeclarationTest.CSharp.cs
new file mode 100644
index 00000000..ce35ed67
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/UsingDeclarationTest.CSharp.cs
@@ -0,0 +1,17 @@
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct1A
+ {
+ public void MyMethod()
+ {
+ }
+ }
+
+ [NativeTypeName("struct MyStruct1B : MyStruct1A")]
+ public partial struct MyStruct1B
+ {
+ public void MyMethod()
+ {
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/UsingDeclarationTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/UsingDeclarationTest.Xml.xml
new file mode 100644
index 00000000..0b7c19e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/UsingDeclarationTest.Xml.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ void
+
+
+
+
+
+ void
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithAccessSpecifierTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithAccessSpecifierTest.CSharp.cs
new file mode 100644
index 00000000..009a2ae5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithAccessSpecifierTest.CSharp.cs
@@ -0,0 +1,23 @@
+namespace ClangSharp.Test
+{
+ internal partial struct MyStruct1
+ {
+ private int Field1;
+
+ public int Field2;
+ }
+
+ internal partial struct MyStruct2
+ {
+ private int Field1;
+
+ public int Field2;
+ }
+
+ public partial struct MyStruct3
+ {
+ private int Field1;
+
+ internal int Field2;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithAccessSpecifierTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithAccessSpecifierTest.Xml.xml
new file mode 100644
index 00000000..81f2baa9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithAccessSpecifierTest.Xml.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Compatible.cs
new file mode 100644
index 00000000..7356faf9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Compatible.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Sequential, Pack = CustomPackValue)]
+ public partial struct MyStruct
+ {
+ [NativeTypeName("size_t[2]")]
+ public _FixedBuffer_e__FixedBuffer FixedBuffer;
+
+ public partial struct _FixedBuffer_e__FixedBuffer
+ {
+ public UIntPtr e0;
+ public UIntPtr e1;
+
+ public unsafe ref UIntPtr this[int index]
+ {
+ get
+ {
+ fixed (UIntPtr* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Default.cs
new file mode 100644
index 00000000..582d798a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Default.cs
@@ -0,0 +1,18 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Sequential, Pack = CustomPackValue)]
+ public partial struct MyStruct
+ {
+ [NativeTypeName("size_t[2]")]
+ public _FixedBuffer_e__FixedBuffer FixedBuffer;
+
+ [InlineArray(2)]
+ public partial struct _FixedBuffer_e__FixedBuffer
+ {
+ public nuint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Latest.cs
new file mode 100644
index 00000000..582d798a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Latest.cs
@@ -0,0 +1,18 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Sequential, Pack = CustomPackValue)]
+ public partial struct MyStruct
+ {
+ [NativeTypeName("size_t[2]")]
+ public _FixedBuffer_e__FixedBuffer FixedBuffer;
+
+ [InlineArray(2)]
+ public partial struct _FixedBuffer_e__FixedBuffer
+ {
+ public nuint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Preview.cs
new file mode 100644
index 00000000..582d798a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.CSharp.Preview.cs
@@ -0,0 +1,18 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Sequential, Pack = CustomPackValue)]
+ public partial struct MyStruct
+ {
+ [NativeTypeName("size_t[2]")]
+ public _FixedBuffer_e__FixedBuffer FixedBuffer;
+
+ [InlineArray(2)]
+ public partial struct _FixedBuffer_e__FixedBuffer
+ {
+ public nuint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Compatible.xml
new file mode 100644
index 00000000..9fef18c6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Compatible.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+ UIntPtr
+
+
+
+ UIntPtr
+
+
+ UIntPtr
+
+
+ ref UIntPtr
+
+ int
+
+
+ fixed (UIntPtr* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Default.xml
new file mode 100644
index 00000000..8c8d33b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ nuint
+
+
+ InlineArray(2)
+
+ nuint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Latest.xml
new file mode 100644
index 00000000..8c8d33b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ nuint
+
+
+ InlineArray(2)
+
+ nuint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Preview.xml
new file mode 100644
index 00000000..8c8d33b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/StructDeclaration/WithPackingTest.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ nuint
+
+
+ InlineArray(2)
+
+ nuint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/TransparentStruct/BooleanKindGeneratesValidHelper.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/TransparentStruct/BooleanKindGeneratesValidHelper.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..c5b15dee
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/TransparentStruct/BooleanKindGeneratesValidHelper.CSharp.Latest.Windows.cs
@@ -0,0 +1,137 @@
+using System;
+using System.Diagnostics;
+
+namespace ClangSharp.Test
+{
+ /// Defines the type of a member as it was used in the native signature.
+ [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
+ [Conditional("DEBUG")]
+ internal sealed partial class NativeTypeNameAttribute : Attribute
+ {
+ private readonly string _name;
+
+ /// Initializes a new instance of the class.
+ /// The name of the type that was used in the native signature.
+ public NativeTypeNameAttribute(string name)
+ {
+ _name = name;
+ }
+
+ /// Gets the name of the type that was used in the native signature.
+ public string Name => _name;
+ }
+
+ /// Defines the annotation found in a native declaration.
+ [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
+ [Conditional("DEBUG")]
+ internal sealed partial class NativeAnnotationAttribute : Attribute
+ {
+ private readonly string _annotation;
+
+ /// Initializes a new instance of the class.
+ /// The annotation that was used in the native declaration.
+ public NativeAnnotationAttribute(string annotation)
+ {
+ _annotation = annotation;
+ }
+
+ /// Gets the annotation that was used in the native declaration.
+ public string Annotation => _annotation;
+ }
+
+ public readonly partial struct MyBoolean : IComparable, IComparable, IEquatable, IFormattable
+ {
+ public readonly byte Value;
+
+ public MyBoolean(byte value)
+ {
+ Value = value;
+ }
+
+ public static MyBoolean FALSE => new MyBoolean(0);
+
+ public static MyBoolean TRUE => new MyBoolean(1);
+
+ public static bool operator ==(MyBoolean left, MyBoolean right) => left.Value == right.Value;
+
+ public static bool operator !=(MyBoolean left, MyBoolean right) => left.Value != right.Value;
+
+ public static bool operator <(MyBoolean left, MyBoolean right) => left.Value < right.Value;
+
+ public static bool operator <=(MyBoolean left, MyBoolean right) => left.Value <= right.Value;
+
+ public static bool operator >(MyBoolean left, MyBoolean right) => left.Value > right.Value;
+
+ public static bool operator >=(MyBoolean left, MyBoolean right) => left.Value >= right.Value;
+
+ public static implicit operator bool(MyBoolean value) => value.Value != 0;
+
+ public static implicit operator MyBoolean(bool value) => new MyBoolean((byte)(value ? 1u : 0u));
+
+ public static bool operator false(MyBoolean value) => value.Value == 0;
+
+ public static bool operator true(MyBoolean value) => value.Value != 0;
+
+ public static implicit operator MyBoolean(byte value) => new MyBoolean(value);
+
+ public static implicit operator byte(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(short value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator short(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(int value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator int(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(long value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator long(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(nint value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator nint(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(sbyte value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static explicit operator sbyte(MyBoolean value) => (sbyte)(value.Value);
+
+ public static explicit operator MyBoolean(ushort value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator ushort(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(uint value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator uint(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(ulong value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator ulong(MyBoolean value) => value.Value;
+
+ public static explicit operator MyBoolean(nuint value) => new MyBoolean(unchecked((byte)(value)));
+
+ public static implicit operator nuint(MyBoolean value) => value.Value;
+
+ public int CompareTo(object? obj)
+ {
+ if (obj is MyBoolean other)
+ {
+ return CompareTo(other);
+ }
+
+ return (obj is null) ? 1 : throw new ArgumentException("obj is not an instance of MyBoolean.");
+ }
+
+ public int CompareTo(MyBoolean other) => Value.CompareTo(other.Value);
+
+ public override bool Equals(object? obj) => (obj is MyBoolean other) && Equals(other);
+
+ public bool Equals(MyBoolean other) => Value.Equals(other.Value);
+
+ public override int GetHashCode() => Value.GetHashCode();
+
+ public override string ToString() => Value.ToString();
+
+ public string ToString(string? format, IFormatProvider? formatProvider) => Value.ToString(format, formatProvider);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_double_5Fdouble.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_double_5Fdouble.CSharp.cs
new file mode 100644
index 00000000..992158fa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_double_5Fdouble.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double r;
+
+ [FieldOffset(0)]
+ public double g;
+
+ [FieldOffset(0)]
+ public double b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_double_5Fdouble.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_double_5Fdouble.Xml.xml
new file mode 100644
index 00000000..35fcc2b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_double_5Fdouble.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_float_5Ffloat.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_float_5Ffloat.CSharp.cs
new file mode 100644
index 00000000..f08785b8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_float_5Ffloat.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float r;
+
+ [FieldOffset(0)]
+ public float g;
+
+ [FieldOffset(0)]
+ public float b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_float_5Ffloat.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_float_5Ffloat.Xml.xml
new file mode 100644
index 00000000..9c2e176d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_float_5Ffloat.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..efdc9f8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_int_5Fint.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int r;
+
+ [FieldOffset(0)]
+ public int g;
+
+ [FieldOffset(0)]
+ public int b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_int_5Fint.Xml.xml
new file mode 100644
index 00000000..5d7c9ff3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_int_5Fint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..e7369e88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_short_5Fshort.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short r;
+
+ [FieldOffset(0)]
+ public short g;
+
+ [FieldOffset(0)]
+ public short b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..11f5b08d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTestInCMode_short_5Fshort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_double_5Fdouble.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_double_5Fdouble.CSharp.cs
new file mode 100644
index 00000000..992158fa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_double_5Fdouble.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double r;
+
+ [FieldOffset(0)]
+ public double g;
+
+ [FieldOffset(0)]
+ public double b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_double_5Fdouble.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_double_5Fdouble.Xml.xml
new file mode 100644
index 00000000..35fcc2b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_double_5Fdouble.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_float_5Ffloat.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_float_5Ffloat.CSharp.cs
new file mode 100644
index 00000000..f08785b8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_float_5Ffloat.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float r;
+
+ [FieldOffset(0)]
+ public float g;
+
+ [FieldOffset(0)]
+ public float b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_float_5Ffloat.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_float_5Ffloat.Xml.xml
new file mode 100644
index 00000000..9c2e176d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_float_5Ffloat.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ float
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_int_5Fint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_int_5Fint.CSharp.cs
new file mode 100644
index 00000000..efdc9f8a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_int_5Fint.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int r;
+
+ [FieldOffset(0)]
+ public int g;
+
+ [FieldOffset(0)]
+ public int b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_int_5Fint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_int_5Fint.Xml.xml
new file mode 100644
index 00000000..5d7c9ff3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_int_5Fint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ int
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_short_5Fshort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_short_5Fshort.CSharp.cs
new file mode 100644
index 00000000..e7369e88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_short_5Fshort.CSharp.cs
@@ -0,0 +1,17 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short r;
+
+ [FieldOffset(0)]
+ public short g;
+
+ [FieldOffset(0)]
+ public short b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_short_5Fshort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_short_5Fshort.Xml.xml
new file mode 100644
index 00000000..11f5b08d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicTest_short_5Fshort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ short
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..83eef48e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("bool")]
+ public byte r;
+
+ [FieldOffset(0)]
+ [NativeTypeName("bool")]
+ public byte g;
+
+ [FieldOffset(0)]
+ [NativeTypeName("bool")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
new file mode 100644
index 00000000..94027b07
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_bool_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
new file mode 100644
index 00000000..7458cdde
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long")]
+ public long r;
+
+ [FieldOffset(0)]
+ [NativeTypeName("long long")]
+ public long g;
+
+ [FieldOffset(0)]
+ [NativeTypeName("long long")]
+ public long b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
new file mode 100644
index 00000000..478b8af8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_long_20long_5Flong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ long
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
new file mode 100644
index 00000000..9f04efdb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char")]
+ public sbyte r;
+
+ [FieldOffset(0)]
+ [NativeTypeName("signed char")]
+ public sbyte g;
+
+ [FieldOffset(0)]
+ [NativeTypeName("signed char")]
+ public sbyte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
new file mode 100644
index 00000000..0b2b4a22
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ sbyte
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
new file mode 100644
index 00000000..2e955545
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char")]
+ public byte r;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char")]
+ public byte g;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char")]
+ public byte b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
new file mode 100644
index 00000000..b6473799
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ byte
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
new file mode 100644
index 00000000..339b1f62
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int")]
+ public uint r;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int")]
+ public uint g;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int")]
+ public uint b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
new file mode 100644
index 00000000..ac1fc227
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
new file mode 100644
index 00000000..71b3faa2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long")]
+ public ulong r;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long")]
+ public ulong g;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long")]
+ public ulong b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
new file mode 100644
index 00000000..07911724
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ ulong
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
new file mode 100644
index 00000000..5b8b0295
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.cs
@@ -0,0 +1,20 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short")]
+ public ushort r;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short")]
+ public ushort g;
+
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short")]
+ public ushort b;
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
new file mode 100644
index 00000000..7f601889
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BasicWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ ushort
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Compatible.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Compatible.Unix.cs
new file mode 100644
index 00000000..e97bbc28
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Compatible.Unix.cs
@@ -0,0 +1,188 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Compatible.Windows.cs
new file mode 100644
index 00000000..4aaa3479
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Compatible.Windows.cs
@@ -0,0 +1,194 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [FieldOffset(0)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [FieldOffset(0)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Default.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Default.Unix.cs
new file mode 100644
index 00000000..255d735e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Default.Unix.cs
@@ -0,0 +1,188 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Default.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Default.Windows.cs
new file mode 100644
index 00000000..8b79a58a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Default.Windows.cs
@@ -0,0 +1,194 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [FieldOffset(0)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [FieldOffset(0)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Latest.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Latest.Unix.cs
new file mode 100644
index 00000000..255d735e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Latest.Unix.cs
@@ -0,0 +1,188 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Latest.Windows.cs
new file mode 100644
index 00000000..8b79a58a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Latest.Windows.cs
@@ -0,0 +1,194 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [FieldOffset(0)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [FieldOffset(0)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Preview.Unix.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Preview.Unix.cs
new file mode 100644
index 00000000..255d735e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Preview.Unix.cs
@@ -0,0 +1,188 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 8) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 7) >> 31;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Preview.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Preview.Windows.cs
new file mode 100644
index 00000000..8b79a58a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.CSharp.Preview.Windows.cs
@@ -0,0 +1,194 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 24")]
+ public uint o0_b0_24
+ {
+ readonly get
+ {
+ return _bitfield1 & 0xFFFFFFu;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+ }
+ }
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 16")]
+ public uint o4_b0_16
+ {
+ readonly get
+ {
+ return _bitfield2 & 0xFFFFu;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 3")]
+ public uint o4_b16_3
+ {
+ readonly get
+ {
+ return (_bitfield2 >> 16) & 0x7u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+ }
+ }
+
+ [NativeTypeName("int : 3")]
+ public int o4_b19_3
+ {
+ readonly get
+ {
+ return (int)(_bitfield2 << 10) >> 29;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+ }
+ }
+
+ [FieldOffset(0)]
+ public byte _bitfield3;
+
+ [NativeTypeName("unsigned char : 1")]
+ public byte o8_b0_1
+ {
+ readonly get
+ {
+ return (byte)(_bitfield3 & 0x1u);
+ }
+
+ set
+ {
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+ }
+ }
+
+ [FieldOffset(0)]
+ public int _bitfield4;
+
+ [NativeTypeName("int : 1")]
+ public int o12_b0_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 31) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+ }
+ }
+
+ [NativeTypeName("int : 1")]
+ public int o12_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield4 << 30) >> 31;
+ }
+
+ set
+ {
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public uint _bitfield1;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield1 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [FieldOffset(0)]
+ public int x;
+
+ [FieldOffset(0)]
+ public uint _bitfield2;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o8_b0_1
+ {
+ readonly get
+ {
+ return _bitfield2 & 0x1u;
+ }
+
+ set
+ {
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit, Pack = 1)]
+ public partial struct MyUnion3
+ {
+ [FieldOffset(0)]
+ public uint _bitfield;
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b0_1
+ {
+ readonly get
+ {
+ return _bitfield & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+ }
+ }
+
+ [NativeTypeName("unsigned int : 1")]
+ public uint o0_b1_1
+ {
+ readonly get
+ {
+ return (_bitfield >> 1) & 0x1u;
+ }
+
+ set
+ {
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Compatible.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Compatible.Unix.xml
new file mode 100644
index 00000000..ac72a129
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Compatible.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Compatible.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Compatible.Windows.xml
new file mode 100644
index 00000000..e18ada54
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Compatible.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Default.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Default.Unix.xml
new file mode 100644
index 00000000..ac72a129
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Default.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Default.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Default.Windows.xml
new file mode 100644
index 00000000..e18ada54
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Default.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Latest.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Latest.Unix.xml
new file mode 100644
index 00000000..ac72a129
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Latest.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Latest.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Latest.Windows.xml
new file mode 100644
index 00000000..e18ada54
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Latest.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Preview.Unix.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Preview.Unix.xml
new file mode 100644
index 00000000..ac72a129
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Preview.Unix.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+ return (byte)((_bitfield2 >> 22) & 0x1u);
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 8) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 7) >> 31;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x1u << 24)) | (uint)((value & 0x1) << 24);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Preview.Windows.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Preview.Windows.xml
new file mode 100644
index 00000000..e18ada54
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/BitfieldTest.Xml.Preview.Windows.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0xFFFFFFu;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0xFFFFFFu) | (value & 0xFFFFFFu);
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0xFFFFu;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0xFFFFu) | (value & 0xFFFFu);
+
+
+
+ uint
+
+ return (_bitfield2 >> 16) & 0x7u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 16)) | ((value & 0x7u) << 16);
+
+
+
+ int
+
+ return (int)(_bitfield2 << 10) >> 29;
+
+
+
+ _bitfield2 = (_bitfield2 & ~(0x7u << 19)) | (uint)((value & 0x7) << 19);
+
+
+
+ byte
+
+
+ byte
+
+ return (byte)(_bitfield3 & 0x1u);
+
+
+
+ _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u));
+
+
+
+ int
+
+
+ int
+
+ return (_bitfield4 << 31) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1);
+
+
+
+ int
+
+ return (_bitfield4 << 30) >> 31;
+
+
+
+ _bitfield4 = (_bitfield4 & ~(0x1 << 1)) | ((value & 0x1) << 1);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield1 & 0x1u;
+
+
+
+ _bitfield1 = (_bitfield1 & ~0x1u) | (value & 0x1u);
+
+
+
+ int
+
+
+ uint
+
+
+ uint
+
+ return _bitfield2 & 0x1u;
+
+
+
+ _bitfield2 = (_bitfield2 & ~0x1u) | (value & 0x1u);
+
+
+
+
+
+ uint
+
+
+ uint
+
+ return _bitfield & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~0x1u) | (value & 0x1u);
+
+
+
+ uint
+
+ return (_bitfield >> 1) & 0x1u;
+
+
+
+ _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1);
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/ExcludeTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/ExcludeTest.CSharp.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/ExcludeTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/ExcludeTest.Xml.xml
new file mode 100644
index 00000000..e69de29b
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..b998b503
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,69 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ public MyUnion e1_0_0_0;
+
+ public MyUnion e0_0_1_0;
+ public MyUnion e1_0_1_0;
+
+ public MyUnion e0_0_2_0;
+ public MyUnion e1_0_2_0;
+
+ public MyUnion e0_0_0_1;
+ public MyUnion e1_0_0_1;
+
+ public MyUnion e0_0_1_1;
+ public MyUnion e1_0_1_1;
+
+ public MyUnion e0_0_2_1;
+ public MyUnion e1_0_2_1;
+
+ public MyUnion e0_0_0_2;
+ public MyUnion e1_0_0_2;
+
+ public MyUnion e0_0_1_2;
+ public MyUnion e1_0_1_2;
+
+ public MyUnion e0_0_2_2;
+ public MyUnion e1_0_2_2;
+
+ public MyUnion e0_0_0_3;
+ public MyUnion e1_0_0_3;
+
+ public MyUnion e0_0_1_3;
+ public MyUnion e1_0_1_3;
+
+ public MyUnion e0_0_2_3;
+ public MyUnion e1_0_2_3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..d6fe3234
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..d6fe3234
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..d6fe3234
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..64ce616d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..8a58cc50
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..8a58cc50
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..8a58cc50
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..93e49230
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,69 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ public MyUnion e1_0_0_0;
+
+ public MyUnion e0_0_1_0;
+ public MyUnion e1_0_1_0;
+
+ public MyUnion e0_0_2_0;
+ public MyUnion e1_0_2_0;
+
+ public MyUnion e0_0_0_1;
+ public MyUnion e1_0_0_1;
+
+ public MyUnion e0_0_1_1;
+ public MyUnion e1_0_1_1;
+
+ public MyUnion e0_0_2_1;
+ public MyUnion e1_0_2_1;
+
+ public MyUnion e0_0_0_2;
+ public MyUnion e1_0_0_2;
+
+ public MyUnion e0_0_1_2;
+ public MyUnion e1_0_1_2;
+
+ public MyUnion e0_0_2_2;
+ public MyUnion e1_0_2_2;
+
+ public MyUnion e0_0_0_3;
+ public MyUnion e1_0_0_3;
+
+ public MyUnion e0_0_1_3;
+ public MyUnion e1_0_1_3;
+
+ public MyUnion e0_0_2_3;
+ public MyUnion e1_0_2_3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..6f2918be
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..6f2918be
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..6f2918be
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..85cdfa76
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..e26f8213
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..e26f8213
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..e26f8213
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..62224d3b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,69 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ public MyUnion e1_0_0_0;
+
+ public MyUnion e0_0_1_0;
+ public MyUnion e1_0_1_0;
+
+ public MyUnion e0_0_2_0;
+ public MyUnion e1_0_2_0;
+
+ public MyUnion e0_0_0_1;
+ public MyUnion e1_0_0_1;
+
+ public MyUnion e0_0_1_1;
+ public MyUnion e1_0_1_1;
+
+ public MyUnion e0_0_2_1;
+ public MyUnion e1_0_2_1;
+
+ public MyUnion e0_0_0_2;
+ public MyUnion e1_0_0_2;
+
+ public MyUnion e0_0_1_2;
+ public MyUnion e1_0_1_2;
+
+ public MyUnion e0_0_2_2;
+ public MyUnion e1_0_2_2;
+
+ public MyUnion e0_0_0_3;
+ public MyUnion e1_0_0_3;
+
+ public MyUnion e0_0_1_3;
+ public MyUnion e1_0_1_3;
+
+ public MyUnion e0_0_2_3;
+ public MyUnion e1_0_2_3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..64795179
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..64795179
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..64795179
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..fa814c0a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..9bc4facb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..9bc4facb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..9bc4facb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..a62d8c78
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,69 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ public MyUnion e1_0_0_0;
+
+ public MyUnion e0_0_1_0;
+ public MyUnion e1_0_1_0;
+
+ public MyUnion e0_0_2_0;
+ public MyUnion e1_0_2_0;
+
+ public MyUnion e0_0_0_1;
+ public MyUnion e1_0_0_1;
+
+ public MyUnion e0_0_1_1;
+ public MyUnion e1_0_1_1;
+
+ public MyUnion e0_0_2_1;
+ public MyUnion e1_0_2_1;
+
+ public MyUnion e0_0_0_2;
+ public MyUnion e1_0_0_2;
+
+ public MyUnion e0_0_1_2;
+ public MyUnion e1_0_1_2;
+
+ public MyUnion e0_0_2_2;
+ public MyUnion e1_0_2_2;
+
+ public MyUnion e0_0_0_3;
+ public MyUnion e1_0_0_3;
+
+ public MyUnion e0_0_1_3;
+ public MyUnion e1_0_1_3;
+
+ public MyUnion e0_0_2_3;
+ public MyUnion e1_0_2_3;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..7863deff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..7863deff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..7863deff
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..5db45631
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0_0_0_0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..c14c6f4c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..c14c6f4c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..c14c6f4c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..82ab6e3d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..836f3959
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..836f3959
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..836f3959
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..fe48fb05
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..f8dc942f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..f8dc942f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..f8dc942f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..dd1517fa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..69c7aa91
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..69c7aa91
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..69c7aa91
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..e2a52cd0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..fb472c0c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..fb472c0c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..fb472c0c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..1a9cbcf8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..a122b44e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..a122b44e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..a122b44e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..8d48f7c0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..072b466a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..072b466a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..072b466a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..bbe7f238
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..c69e2dfa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..c69e2dfa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..c69e2dfa
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..87d08fea
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..968fcb68
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..968fcb68
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..968fcb68
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..c0d74687
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..3617f76b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..3617f76b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..3617f76b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..c80ac414
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..8444db87
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..8444db87
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..8444db87
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ double
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..c5c08814
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..06c3db75
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..06c3db75
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..06c3db75
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..648ad6dc
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..93760200
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..93760200
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..93760200
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ float
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..269a2520
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..d265be9a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..d265be9a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..d265be9a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public int value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..a3ce127f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..60489cd1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..60489cd1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..60489cd1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ int
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..6d32f344
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..1c269675
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..1c269675
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..1c269675
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,26 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public short value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..40590d67
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..cea7b477
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..cea7b477
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..cea7b477
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ short
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..9fb1f78f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..95cd2d43
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..95cd2d43
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..95cd2d43
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("bool")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..9972cc04
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..c4b1b035
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..c4b1b035
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..c4b1b035
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_bool_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..1bef67c6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..5de3a377
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..5de3a377
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..5de3a377
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long")]
+ public long value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..83642041
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..c73e1bc9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..c73e1bc9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..c73e1bc9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ long
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..3d0294b4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..9bc3a6d5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..9bc3a6d5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..9bc3a6d5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char")]
+ public sbyte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..b1a7c5fe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..11764a36
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..11764a36
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..11764a36
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ sbyte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..0cff7d2a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..0607980a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..0607980a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..0607980a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char")]
+ public byte value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..ba97b200
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..53df6c08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..53df6c08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..53df6c08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ byte
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..8911055d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..b0bebdd8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..b0bebdd8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..b0bebdd8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int")]
+ public uint value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..44af27e3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..43d1e56d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..43d1e56d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..43d1e56d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ uint
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..be5270b8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..1d000776
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..1d000776
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..1d000776
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long")]
+ public ulong value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..c981d218
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..5667b59d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..5667b59d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..5667b59d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ulong
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..4ab12701
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ public MyUnion e1;
+ public MyUnion e2;
+
+ public unsafe ref MyUnion this[int index]
+ {
+ get
+ {
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..aeed3565
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..aeed3565
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..aeed3565
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,27 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short")]
+ public ushort value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyOtherUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyUnion[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public MyUnion e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..e996d13f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyUnion
+
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ MyUnion
+
+
+ ref MyUnion
+
+ int
+
+
+ fixed (MyUnion* pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..82dba2e2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..82dba2e2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..82dba2e2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferNonPrimitiveWithNativeTypeNameTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ushort
+
+
+
+
+ MyUnion
+
+
+ InlineArray(3)
+
+ MyUnion
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.CSharp.cs
new file mode 100644
index 00000000..a56d836a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.CSharp.cs
@@ -0,0 +1,30 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public double* e0;
+ public double* e1;
+ public double* e2;
+
+ public ref double* this[int index]
+ {
+ get
+ {
+ fixed (double** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.Xml.xml
new file mode 100644
index 00000000..df40f1b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_double_20_2A_5Fdouble_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ double*
+
+
+
+ double*
+
+
+ double*
+
+
+ double*
+
+
+ ref double*
+
+ int
+
+
+ fixed (double** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.CSharp.cs
new file mode 100644
index 00000000..324f52e7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.CSharp.cs
@@ -0,0 +1,30 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public float* e0;
+ public float* e1;
+ public float* e2;
+
+ public ref float* this[int index]
+ {
+ get
+ {
+ fixed (float** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.Xml.xml
new file mode 100644
index 00000000..53e7e7ae
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_float_20_2A_5Ffloat_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ float*
+
+
+
+ float*
+
+
+ float*
+
+
+ float*
+
+
+ ref float*
+
+ int
+
+
+ fixed (float** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.CSharp.cs
new file mode 100644
index 00000000..37269f66
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.CSharp.cs
@@ -0,0 +1,30 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public int* e0;
+ public int* e1;
+ public int* e2;
+
+ public ref int* this[int index]
+ {
+ get
+ {
+ fixed (int** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.Xml.xml
new file mode 100644
index 00000000..762a02e4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_int_20_2A_5Fint_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ int*
+
+
+
+ int*
+
+
+ int*
+
+
+ int*
+
+
+ ref int*
+
+ int
+
+
+ fixed (int** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.CSharp.cs
new file mode 100644
index 00000000..53291adb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.CSharp.cs
@@ -0,0 +1,30 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short *[3]")]
+ public _c_e__FixedBuffer c;
+
+ public unsafe partial struct _c_e__FixedBuffer
+ {
+ public short* e0;
+ public short* e1;
+ public short* e2;
+
+ public ref short* this[int index]
+ {
+ get
+ {
+ fixed (short** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.Xml.xml
new file mode 100644
index 00000000..464d75e1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPointerTest_short_20_2A_5Fshort_2A.Xml.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ short*
+
+
+
+ short*
+
+
+ short*
+
+
+ short*
+
+
+ ref short*
+
+ int
+
+
+ fixed (short** pThis = &e0)
+ {
+ return ref pThis[index];
+ }
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..0d7d49b1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[2][1][3][4]")]
+ public fixed double c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..807bab88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..807bab88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..807bab88
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..a0e0c938
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..b205f761
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..b205f761
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..b205f761
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..8708bafd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[2][1][3][4]")]
+ public fixed float c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..de835b08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..de835b08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..de835b08
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..dc11d43e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..0e1809f7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..0e1809f7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..0e1809f7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..c9e34b8c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[2][1][3][4]")]
+ public fixed int c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..038d5e97
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..038d5e97
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..038d5e97
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..e1feb58d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..ae3fc7b2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..ae3fc7b2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..ae3fc7b2
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..4739b508
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[2][1][3][4]")]
+ public fixed long c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..7814d878
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..7814d878
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..7814d878
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..456177d6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..59318b30
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..59318b30
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..59318b30
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..32ec48d7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[2][1][3][4]")]
+ public fixed short c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..c2f7333c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..c2f7333c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..c2f7333c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..beb5ebef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..7705d623
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..7705d623
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..7705d623
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..5c43cb51
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public fixed sbyte c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..855f2e71
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..855f2e71
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..855f2e71
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..dabb315f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..9e2e2458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..9e2e2458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..9e2e2458
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..f90641d3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public fixed byte c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..229e35e0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..229e35e0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..229e35e0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..163e5db4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..4755355b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..4755355b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..4755355b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..5fb5ec10
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public fixed uint c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..b25a25bd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..b25a25bd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..b25a25bd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..c7e1a215
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..b9acf37d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..b9acf37d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..b9acf37d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..37fa0e4f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public fixed ulong c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..e0b6e3ef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..e0b6e3ef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..e0b6e3ef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..35611605
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..6a5918b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..6a5918b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..6a5918b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..29789dd7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public fixed ushort c[2 * 1 * 3 * 4];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..38394780
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..38394780
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..38394780
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[2][1][3][4]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(2 * 1 * 3 * 4)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0_0_0_0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..ff497a51
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..107453fe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..107453fe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..107453fe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveMultidimensionalTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(2 * 1 * 3 * 4)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..5926dfd5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[3]")]
+ public fixed double c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..455d320c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..455d320c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..455d320c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("double[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..88816062
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..d2e3f6c5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..d2e3f6c5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..d2e3f6c5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..8688dd77
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[3]")]
+ public fixed float c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..2d8c5fef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..2d8c5fef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..2d8c5fef
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("float[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..627f9026
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..2bcf6110
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..2bcf6110
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..2bcf6110
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..b0b7f392
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[3]")]
+ public fixed int c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..b5fc1ea5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..b5fc1ea5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..b5fc1ea5
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..9f2f1f43
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..1cfd620d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..1cfd620d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..1cfd620d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..6a9096be
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[3]")]
+ public fixed long c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..dc877a05
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..dc877a05
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..dc877a05
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..ffe2676f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..7155cb78
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..7155cb78
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..7155cb78
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..fb03ac26
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[3]")]
+ public fixed short c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..962501a9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..962501a9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..962501a9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..4e761f75
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..b47cf01b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..b47cf01b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..b47cf01b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..44e18b2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[3]")]
+ public fixed sbyte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..d25926a4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..d25926a4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..d25926a4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("signed char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..fbd923f9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..8a9b54ad
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..8a9b54ad
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..8a9b54ad
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..0707a8d0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[3]")]
+ public fixed byte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..6a189d7d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..6a189d7d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..6a189d7d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned char[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..f8800a3f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..7e5e7769
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..7e5e7769
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..7e5e7769
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..20f4e29f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[3]")]
+ public fixed uint c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..7976bc29
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..7976bc29
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..7976bc29
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned int[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..20f4e22b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..b36aa683
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..b36aa683
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..b36aa683
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..bdf3bf5b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[3]")]
+ public fixed ulong c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..1fbfc59f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..1fbfc59f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..1fbfc59f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned long long[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..90e4a7fd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..a17189a1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..a17189a1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..a17189a1
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..7fdbbdbe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[3]")]
+ public fixed ushort c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..a3721721
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..a3721721
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..a3721721
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("unsigned short[3]")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..1876e71a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..c0594172
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..c0594172
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..c0594172
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
new file mode 100644
index 00000000..3ab1db6e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed double c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
new file mode 100644
index 00000000..feee9af0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
new file mode 100644
index 00000000..feee9af0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
new file mode 100644
index 00000000..feee9af0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
new file mode 100644
index 00000000..e515cc0c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ double
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
new file mode 100644
index 00000000..338b7b2f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
new file mode 100644
index 00000000..338b7b2f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
new file mode 100644
index 00000000..338b7b2f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_double_5Fdouble.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ double
+
+
+ InlineArray(3)
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
new file mode 100644
index 00000000..d5b831ec
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed float c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
new file mode 100644
index 00000000..4f619c97
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
new file mode 100644
index 00000000..4f619c97
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
new file mode 100644
index 00000000..4f619c97
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
new file mode 100644
index 00000000..0fd4a679
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ float
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
new file mode 100644
index 00000000..7ebdf2ca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
new file mode 100644
index 00000000..7ebdf2ca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
new file mode 100644
index 00000000..7ebdf2ca
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_float_5Ffloat.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ float
+
+
+ InlineArray(3)
+
+ float
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
new file mode 100644
index 00000000..17b8257f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed int c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
new file mode 100644
index 00000000..02e4c8fb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
new file mode 100644
index 00000000..02e4c8fb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
new file mode 100644
index 00000000..02e4c8fb
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public int e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
new file mode 100644
index 00000000..7ee6ea5e
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ int
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
new file mode 100644
index 00000000..61f48ff0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
new file mode 100644
index 00000000..61f48ff0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
new file mode 100644
index 00000000..61f48ff0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_int_5Fint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ int
+
+
+ InlineArray(3)
+
+ int
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Compatible.cs
new file mode 100644
index 00000000..3fb3139d
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed long c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Default.cs
new file mode 100644
index 00000000..9f9ad14b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Latest.cs
new file mode 100644
index 00000000..9f9ad14b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Preview.cs
new file mode 100644
index 00000000..9f9ad14b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public long e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Compatible.xml
new file mode 100644
index 00000000..0ea92202
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ long
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Default.xml
new file mode 100644
index 00000000..6e49cbc9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Latest.xml
new file mode 100644
index 00000000..6e49cbc9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Preview.xml
new file mode 100644
index 00000000..6e49cbc9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_long_20long_5Flong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ long
+
+
+ InlineArray(3)
+
+ long
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
new file mode 100644
index 00000000..5f0e2376
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed short c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
new file mode 100644
index 00000000..831a86b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
new file mode 100644
index 00000000..831a86b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
new file mode 100644
index 00000000..831a86b6
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public short e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
new file mode 100644
index 00000000..ae71f5b3
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ short
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
new file mode 100644
index 00000000..1b8472a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
new file mode 100644
index 00000000..1b8472a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
new file mode 100644
index 00000000..1b8472a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_short_5Fshort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ short
+
+
+ InlineArray(3)
+
+ short
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..50e84587
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed sbyte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Default.cs
new file mode 100644
index 00000000..e934e334
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..e934e334
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..e934e334
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public sbyte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..3c3399c4
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ sbyte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Default.xml
new file mode 100644
index 00000000..eb5db7ac
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Latest.xml
new file mode 100644
index 00000000..eb5db7ac
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Preview.xml
new file mode 100644
index 00000000..eb5db7ac
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_signed_20char_5Fsbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ sbyte
+
+
+ InlineArray(3)
+
+ sbyte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
new file mode 100644
index 00000000..4c5575df
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed byte c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Default.cs
new file mode 100644
index 00000000..a4df4606
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
new file mode 100644
index 00000000..a4df4606
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
new file mode 100644
index 00000000..a4df4606
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public byte e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
new file mode 100644
index 00000000..023a2c93
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ byte
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Default.xml
new file mode 100644
index 00000000..9ee51743
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Latest.xml
new file mode 100644
index 00000000..9ee51743
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Preview.xml
new file mode 100644
index 00000000..9ee51743
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20char_5Fbyte.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ byte
+
+
+ InlineArray(3)
+
+ byte
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
new file mode 100644
index 00000000..ca73b84b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed uint c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Default.cs
new file mode 100644
index 00000000..db336d1f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Latest.cs
new file mode 100644
index 00000000..db336d1f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Preview.cs
new file mode 100644
index 00000000..db336d1f
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public uint e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Compatible.xml
new file mode 100644
index 00000000..db613152
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ uint
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Default.xml
new file mode 100644
index 00000000..d6c18f54
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Latest.xml
new file mode 100644
index 00000000..d6c18f54
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Preview.xml
new file mode 100644
index 00000000..d6c18f54
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20int_5Fuint.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ uint
+
+
+ InlineArray(3)
+
+ uint
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
new file mode 100644
index 00000000..5d928f95
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed ulong c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
new file mode 100644
index 00000000..344c5a3c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
new file mode 100644
index 00000000..344c5a3c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
new file mode 100644
index 00000000..344c5a3c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ulong e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
new file mode 100644
index 00000000..1883631a
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ulong
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
new file mode 100644
index 00000000..cbd1693b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
new file mode 100644
index 00000000..cbd1693b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
new file mode 100644
index 00000000..cbd1693b
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20long_20long_5Fulong.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ulong
+
+
+ InlineArray(3)
+
+ ulong
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
new file mode 100644
index 00000000..8e8aebdf
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Compatible.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public fixed ushort c[3];
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Default.cs
new file mode 100644
index 00000000..5aeb3216
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Default.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Latest.cs
new file mode 100644
index 00000000..5aeb3216
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Latest.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Preview.cs
new file mode 100644
index 00000000..5aeb3216
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.CSharp.Preview.cs
@@ -0,0 +1,19 @@
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ [NativeTypeName("MyBuffer")]
+ public _c_e__FixedBuffer c;
+
+ [InlineArray(3)]
+ public partial struct _c_e__FixedBuffer
+ {
+ public ushort e0;
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Compatible.xml
new file mode 100644
index 00000000..00b30e2c
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Compatible.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+ ushort
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Default.xml
new file mode 100644
index 00000000..a828d668
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Latest.xml
new file mode 100644
index 00000000..a828d668
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Latest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Preview.xml
new file mode 100644
index 00000000..a828d668
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/FixedSizedBufferPrimitiveTypedefTest_unsigned_20short_5Fushort.Xml.Preview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ ushort
+
+
+ InlineArray(3)
+
+ ushort
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/GuidTest.CSharp.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/GuidTest.CSharp.cs
new file mode 100644
index 00000000..be649a74
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/GuidTest.CSharp.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ [StructLayout(LayoutKind.Explicit)]
+ [Guid("00000000-0000-0000-C000-000000000046")]
+ public partial struct MyUnion1
+ {
+ [FieldOffset(0)]
+ public int x;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ [Guid("00000000-0000-0000-C000-000000000047")]
+ public partial struct MyUnion2
+ {
+ [FieldOffset(0)]
+ public int x;
+ }
+
+ public static partial class Methods
+ {
+ public static readonly Guid IID_MyUnion1 = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
+
+ public static readonly Guid IID_MyUnion2 = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47);
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/GuidTest.Xml.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/GuidTest.Xml.xml
new file mode 100644
index 00000000..72c17583
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/GuidTest.Xml.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ int
+
+
+
+
+ int
+
+
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Compatible.cs
new file mode 100644
index 00000000..5ebb0ab8
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Compatible.cs
@@ -0,0 +1,73 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double r;
+
+ [FieldOffset(0)]
+ public double g;
+
+ [FieldOffset(0)]
+ public double b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ public ref double a
+ {
+ get
+ {
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->a;
+ }
+ }
+ }
+
+ public ref MyStruct s
+ {
+ get
+ {
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->s;
+ }
+ }
+ }
+
+ public ref double buffer
+ {
+ get
+ {
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->buffer[0];
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public double a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("double[4]")]
+ public fixed double buffer[4];
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Default.cs
new file mode 100644
index 00000000..5077a3a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Default.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double r;
+
+ [FieldOffset(0)]
+ public double g;
+
+ [FieldOffset(0)]
+ public double b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ [UnscopedRef]
+ public ref double a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyStruct s
+ {
+ get
+ {
+ return ref Anonymous.s;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer
+ {
+ get
+ {
+ return Anonymous.buffer;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public double a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("double[4]")]
+ public _buffer_e__FixedBuffer buffer;
+
+ [InlineArray(4)]
+ public partial struct _buffer_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Latest.cs
new file mode 100644
index 00000000..5077a3a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Latest.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double r;
+
+ [FieldOffset(0)]
+ public double g;
+
+ [FieldOffset(0)]
+ public double b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ [UnscopedRef]
+ public ref double a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyStruct s
+ {
+ get
+ {
+ return ref Anonymous.s;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer
+ {
+ get
+ {
+ return Anonymous.buffer;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public double a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("double[4]")]
+ public _buffer_e__FixedBuffer buffer;
+
+ [InlineArray(4)]
+ public partial struct _buffer_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Preview.cs
new file mode 100644
index 00000000..5077a3a7
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.CSharp.Preview.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public double value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public double r;
+
+ [FieldOffset(0)]
+ public double g;
+
+ [FieldOffset(0)]
+ public double b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ [UnscopedRef]
+ public ref double a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyStruct s
+ {
+ get
+ {
+ return ref Anonymous.s;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer
+ {
+ get
+ {
+ return Anonymous.buffer;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public double a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("double[4]")]
+ public _buffer_e__FixedBuffer buffer;
+
+ [InlineArray(4)]
+ public partial struct _buffer_e__FixedBuffer
+ {
+ public double e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Compatible.xml
new file mode 100644
index 00000000..1e672581
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Compatible.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Union
+
+
+ ref double
+
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->a;
+ }
+
+
+
+ ref MyStruct
+
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->s;
+ }
+
+
+
+ ref double
+
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->buffer[0];
+ }
+
+
+
+
+ double
+
+
+ MyStruct
+
+
+ double
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Default.xml
new file mode 100644
index 00000000..8c0b09dd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Default.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Union
+
+
+ ref double
+
+ return ref Anonymous.a;
+
+
+
+ ref MyStruct
+
+ return ref Anonymous.s;
+
+
+
+ Span<double>
+
+ return Anonymous.buffer;
+
+
+
+
+ double
+
+
+ MyStruct
+
+
+ double
+
+
+ InlineArray(4)
+
+ double
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Latest.xml
new file mode 100644
index 00000000..8c0b09dd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Latest.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Union
+
+
+ ref double
+
+ return ref Anonymous.a;
+
+
+
+ ref MyStruct
+
+ return ref Anonymous.s;
+
+
+
+ Span<double>
+
+ return Anonymous.buffer;
+
+
+
+
+ double
+
+
+ MyStruct
+
+
+ double
+
+
+ InlineArray(4)
+
+ double
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Preview.xml
new file mode 100644
index 00000000..8c0b09dd
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_double_5Fdouble_5F11_5F5.Xml.Preview.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ double
+
+
+
+
+ double
+
+
+ double
+
+
+ double
+
+
+ _Anonymous_e__Union
+
+
+ ref double
+
+ return ref Anonymous.a;
+
+
+
+ ref MyStruct
+
+ return ref Anonymous.s;
+
+
+
+ Span<double>
+
+ return Anonymous.buffer;
+
+
+
+
+ double
+
+
+ MyStruct
+
+
+ double
+
+
+ InlineArray(4)
+
+ double
+
+
+
+
+
+
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Compatible.cs
new file mode 100644
index 00000000..04ee0cfe
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Compatible.cs
@@ -0,0 +1,73 @@
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float r;
+
+ [FieldOffset(0)]
+ public float g;
+
+ [FieldOffset(0)]
+ public float b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ public ref float a
+ {
+ get
+ {
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->a;
+ }
+ }
+ }
+
+ public ref MyStruct s
+ {
+ get
+ {
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->s;
+ }
+ }
+ }
+
+ public ref float buffer
+ {
+ get
+ {
+ fixed (_Anonymous_e__Union* pField = &Anonymous)
+ {
+ return ref pField->buffer[0];
+ }
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public unsafe partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public float a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("float[4]")]
+ public fixed float buffer[4];
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Default.cs
new file mode 100644
index 00000000..4d586be0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Default.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float r;
+
+ [FieldOffset(0)]
+ public float g;
+
+ [FieldOffset(0)]
+ public float b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ [UnscopedRef]
+ public ref float a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyStruct s
+ {
+ get
+ {
+ return ref Anonymous.s;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer
+ {
+ get
+ {
+ return Anonymous.buffer;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public float a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("float[4]")]
+ public _buffer_e__FixedBuffer buffer;
+
+ [InlineArray(4)]
+ public partial struct _buffer_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Latest.cs
new file mode 100644
index 00000000..4d586be0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Latest.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float r;
+
+ [FieldOffset(0)]
+ public float g;
+
+ [FieldOffset(0)]
+ public float b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ [UnscopedRef]
+ public ref float a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyStruct s
+ {
+ get
+ {
+ return ref Anonymous.s;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer
+ {
+ get
+ {
+ return Anonymous.buffer;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public float a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("float[4]")]
+ public _buffer_e__FixedBuffer buffer;
+
+ [InlineArray(4)]
+ public partial struct _buffer_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Preview.cs
new file mode 100644
index 00000000..4d586be0
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.CSharp.Preview.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace ClangSharp.Test
+{
+ public partial struct MyStruct
+ {
+ public float value;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct MyUnion
+ {
+ [FieldOffset(0)]
+ public float r;
+
+ [FieldOffset(0)]
+ public float g;
+
+ [FieldOffset(0)]
+ public float b;
+
+ [FieldOffset(0)]
+ [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")]
+ public _Anonymous_e__Union Anonymous;
+
+ [UnscopedRef]
+ public ref float a
+ {
+ get
+ {
+ return ref Anonymous.a;
+ }
+ }
+
+ [UnscopedRef]
+ public ref MyStruct s
+ {
+ get
+ {
+ return ref Anonymous.s;
+ }
+ }
+
+ [UnscopedRef]
+ public Span buffer
+ {
+ get
+ {
+ return Anonymous.buffer;
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public partial struct _Anonymous_e__Union
+ {
+ [FieldOffset(0)]
+ public float a;
+
+ [FieldOffset(0)]
+ public MyStruct s;
+
+ [FieldOffset(0)]
+ [NativeTypeName("float[4]")]
+ public _buffer_e__FixedBuffer buffer;
+
+ [InlineArray(4)]
+ public partial struct _buffer_e__FixedBuffer
+ {
+ public float e0;
+ }
+ }
+ }
+}
diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.Xml.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.Xml.Compatible.xml
new file mode 100644
index 00000000..9e5635a9
--- /dev/null
+++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/UnionDeclaration/NestedAnonymousTest_float_5Ffloat_5F11_5F5.Xml.Compatible.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+